Hi,
my app basically stores a jar file in a "Blob" in mysql and then grabs it through a PHP file. This is not a problem, because doing:
$ wget http://path/to/php
$ jar tf file.jar
shows the classes perfectly fine. I have tried many things, and the farthest I've gotten is when using ClassLoader.loadClass() when I call newInstance() it stops there; no exception is thrown (looking at the source it's not a runtime exception).
The thing is, it "loads" it fine, in the sense I can dump the file names, and view the methods contained within it (this class is NOT on the classpath). I cannot call methods; there is no constructor with args.
This is the basic method I'm currently trying (I've tried other variations):
URL[] urls = new URL[] { new URL("jar:http://path/to/file!/") };
URLClassLoader cl = new URLClassLoader(urls);
// getClassName(int) just looks at my webserver for what class name to use.
// the jar is composed of one main class with subclasses, ie
// Class
// Class$Sub
// Class$A
Class<?> s = cl.loadClass(getClassName(id)); // Class.forName() throws ClassNotFound
s.newInstance(); // crashes here
System.out.println("Done."); // to illustrate if it DID finish
// method.invoke() will just throw NPE, as well.
Any help is greatly appreciated. Could the subclasses actually be the problem?
Thank you.