#73 classLoader.getResources(path) fails to return resource URL

v1.0 (example)
open
nobody
None
5
2014-01-03
2014-01-03
No

when using One-jar the classloader method getResources( string ) does not work as expected.

attached example code attempts to find all the com.example classes.

  • When compiled it runs as expected from the command line with the classes in the classpath.
  • When packaged into a jar (without one-jar) and run from the command line (java -jar OneJarLoaderIssue-1.jar) it runs as expected
  • When packaged into a one-jar and run from the command line (java -jar OneJarLoaderIssue-1.one-jar.jar) it fails.

Complete maven project is included in the attachment.

1 Attachments

Discussion