I know that you can get a file in your jar with
InputStream resource = ClassLoader.getSystemResourceAsStream("com/foo/bar.txt");
Is it possible to do that with classes also, with something like:
InputStream yourclass = ClassLoader.getSystemResourceAsStream("com/foo/Clazz.class");
Edit: I checked it, and the seccond example does work. It just returns null
. I am wondering if there is something that would do what the seccond example should.