0

I'm using a util class (http://pastie.org/private/mxvpdrs3y2xutbjdo68a#11,14,17) to iterate over all classes inside a package.

The problem is that getResources("my/package") returns an empty Enumeration even though getResource("my/package/MyClass.class") gives the correct URL for all containing classes ("jar:file:/C:/Users/---/Desktop/Server/plugins/Test.jar!/my/package/MyClass.class").

Usage (in my.test.Reader):

List<Class<?>> classes = new ArrayList<Class<?>>();

try {
    classes = new ClassScanner("my.package").scan();
} catch (ClassNotFoundException | IOException ex) {
    ex.printStackTrace();
}

Debugging (in my.scan.ClassScanner): http://pastie.org/private/dhahvghtitqeiv6jex15q

Regards, squibs

squibs
  • 1
  • 1

0 Answers0