Hi everyone,
I just packed all my classes in a nice jar and designated the class with main using Main-Class. Now the problem starts:
java -jar -classpath %A_BUNCH_OF_CLASSPATH% app.jar
Guess what, java cannot find the classes on the -classpath? Does java look at the -classpath at all when executing an application within a .jar file?
Thanks for all your help!
-
Packaging the Client App in a Jar (4 messages)
- Posted by: Digit Sequence
- Posted on: May 17 2001 03:21 EDT
Threaded Messages (4)
- Packaging the Client App in a Jar by justin walsh on May 17 2001 07:09 EDT
- Packaging the Client App in a Jar by Digit Sequence on May 17 2001 22:56 EDT
- Packaging the Client App in a Jar by Digit Sequence on May 17 2001 11:23 EDT
- Packaging the Client App in a Jar by Digit Sequence on May 17 2001 22:56 EDT
- Packaging the Client App in a Jar by Lyndon Samson on May 29 2001 10:33 EDT
-
Packaging the Client App in a Jar[ Go to top ]
- Posted by: justin walsh
- Posted on: May 17 2001 07:09 EDT
- in response to Digit Sequence
Are you sure that the directory that the jar file is in (possibly the current directory) is in the classpath?
eg
java -jar -classpath %A_BUNCH_OF_CLASSPATH%;. app.jar
(nb ------ ) -
Packaging the Client App in a Jar[ Go to top ]
- Posted by: Digit Sequence
- Posted on: May 17 2001 22:56 EDT
- in response to justin walsh
It executes my app in the app.jar, but my app cannot find the JDBC driver which is specified in the -classpath argument.
Yeah, I do have the "." in the -classpath.
-
Packaging the Client App in a Jar[ Go to top ]
- Posted by: Digit Sequence
- Posted on: May 17 2001 23:23 EDT
- in response to Digit Sequence
If I run my app using the same classpath settings but with the classes in a directory structure instead of packaged in a .jar file, everything works great.
If one wants to run from a .jar file, does all extra class libraries need to be in the .jar file as well?
-
Packaging the Client App in a Jar[ Go to top ]
- Posted by: Lyndon Samson
- Posted on: May 29 2001 10:33 EDT
- in response to Digit Sequence
Yoy seem to have a space in your -classpath parm