J
Java and Swing
I have an application which loads some Java code from a JAR. So I have
two jar files....
MyApp.jar and Blah.jar.
MyApp.jar is the main application, and at some point it uses a
ClassLoader to load Blah.jar, and instantiate a class inside of it.
However, for some reason when I run MyApp from the jar, as such:
java -jar MyApp.jar .....I get IllegalAccessError: tried to load class
from ......etc.
However, if I run it from the class files as such:
java -cp bin;Blah.jar com.acme.foo.Main it works just fine.
Any ideas what the problem is? how to fix it?
thanks
two jar files....
MyApp.jar and Blah.jar.
MyApp.jar is the main application, and at some point it uses a
ClassLoader to load Blah.jar, and instantiate a class inside of it.
However, for some reason when I run MyApp from the jar, as such:
java -jar MyApp.jar .....I get IllegalAccessError: tried to load class
from ......etc.
However, if I run it from the class files as such:
java -cp bin;Blah.jar com.acme.foo.Main it works just fine.
Any ideas what the problem is? how to fix it?
thanks