File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes How to Execute jars Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "How to Execute jars" Watch "How to Execute jars" New topic
Author

How to Execute jars

Bhasker Reddy
Ranch Hand

Joined: Jun 13, 2000
Posts: 176
I am trying to execute a jar file
by using this command
java -jar myapp.jar -r
It is giving me this error.
I created myapp.jar using JBUILDER java archive builder tool by selecting
all the java classes in my app and providing main class.
Do you have any idea why this is happening
Exception in thread "main" java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at java.util.jar.JarFile.<init>(JarFile.java:55)


Bhasker Reddy
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 469
It looks like myapp.jar can't be found in the current directory, or has not read attributes.


Get power of your iPod with MediaChest | Minimal J2EE container is here | Light weight full J2EE stack | My blog | Co-author of "Windows programming in Turbo Pascal"
 
IntelliJ Java IDE
 
subject: How to Execute jars
 
Threads others viewed
jar file main method
Junilu, Ian, Peter and others pls help
running a class in a jar ......
NX- About Launching the application
Unable to execute executable jar file
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture