this - can't be null
this.getClass() - can't be null
this.getClass().getClassLoader() - can't be null
this.getClass().getClassLoader().getResource(
String) - can be null
So I would start there: What does getResource(String) actual gets you before calling .getPath() on it? Do a simple sysout to see if it's null. Progress from there onwards.