This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Unable to execute executable jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Unable to execute executable jar file " Watch "Unable to execute executable jar file " New topic
Author

Unable to execute executable jar file

Amit Kr Kumar
Ranch Hand

Joined: Feb 08, 2002
Posts: 100
Hi Team
I am facing a very unusual problem. I have created an executable server jar file. I am able to run it using the java -jar server.jar from the same directory where server.jar file is lying.
However when i go to any other directory from prompt and execute java -jar server.jar it says :

Exception in thread "main" java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:110)
at java.util.jar.JarFile.<init>(JarFile.java:115)
at java.util.jar.JarFile.<init>(JarFile.java:57)
I have set the classpath as well in the prompt
using the command
set CLASSPATH=%CLASSPATH%;c:\server\server.jar;
Pls Help
Amit
Amit Kr Kumar
Ranch Hand

Joined: Feb 08, 2002
Posts: 100
Anybody Please Help
Amit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to execute executable jar file
 
Similar Threads
Junilu, Ian, Peter and others pls help
Executing jar file - Urgent (Max Help)
running a class in a jar ......
How to Execute jars
NX- About Launching the application