Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to execute executable jar file

 
Amit Kr Kumar
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody Please Help
Amit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic