on 12-07-2005 12:35 PM
Hi,
I have a small non-graphical Java application, packaged into a Jar file. My program relies on classes in another (external) Jar file.
When I run the application from the IDE, everything works fine. However, when I try to run the application from the command line, I keep getting a NoClassDefFoundError for classes in the external jar.
Both the application jar file and the external jar file are in my root directory (C:\).
My command line call is as follows:
java -cp c:MyExternalLib.jar -jar MyApp.jar
Any help greatly appreciated.
Thanks,
Walter
hi,
set classpath=%classpath%;c:\myjar.jar;
here i have specified myjar.jar file as an example u give ur location.after setting the classpath run ur java application.
java mypgm
this will solve ur problem
regards,
Ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you try putting all the files in the \bin folder of the jdk installation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.