My Java application needs to be able to find a myconfig/ directory which will be bundled inside the same JAR:
myconfig/
myjar.jar/ com/ me/
The trick seems to be that the class loader can find directories in the classpath, while the class can not.
So this works
this.getClass().getClassLoader().getResource("com/example/foo/myconfig");
while this does not
this.getClass().getResource("myconfig");