T
Tack
I have built an application in Eclipse which goes through some JARs,
retrieves the classes within them and introspects the classes to get more
detailed info from them.
I was getting NoClassDefFoundError issues when I tried to introspect some of
the classes (at runtime obviously), which were resolved by adding the
dependency JARs to the Eclipse build path for the project. Now the build
path is configured the program is running fine in Eclipse.
However, when I try to run the program from the command line I am getting
the NoClassDefFoundError errors occurring again. It's pretty clear that the
issues are classpath related. So I've tried the following commands (where
jar1 and jar2 were added to the Eclipse build path):
java -classpath c:\jars\jar1.jar;c:\jars\jar2.jar; -jar myApp.jar
and
set CLASSPATH=c:\jars\jar1.jar;c:\jars\jar2.jar
java -jar myApp.jar
.... but both fail to stop the NoClassDefFoundError problems. For some reason
adding the JARs to the build path in Eclipse stops the issues, but setting
the classpath via the command line doesn't.
Any ideas?
retrieves the classes within them and introspects the classes to get more
detailed info from them.
I was getting NoClassDefFoundError issues when I tried to introspect some of
the classes (at runtime obviously), which were resolved by adding the
dependency JARs to the Eclipse build path for the project. Now the build
path is configured the program is running fine in Eclipse.
However, when I try to run the program from the command line I am getting
the NoClassDefFoundError errors occurring again. It's pretty clear that the
issues are classpath related. So I've tried the following commands (where
jar1 and jar2 were added to the Eclipse build path):
java -classpath c:\jars\jar1.jar;c:\jars\jar2.jar; -jar myApp.jar
and
set CLASSPATH=c:\jars\jar1.jar;c:\jars\jar2.jar
java -jar myApp.jar
.... but both fail to stop the NoClassDefFoundError problems. For some reason
adding the JARs to the build path in Eclipse stops the issues, but setting
the classpath via the command line doesn't.
Any ideas?