• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in jar file creation?  RSS feed

 
Ashok Pradhan
Ranch Hand
Posts: 180
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Windows XP SP2.JDK 1.6 is installed.

In My D drive i have my Main.class and menifest.mft.In menifest.mft i have written:-
Main-Class: Main

[I have pressed enter after writing Main]

then i execute the command in command prompt as follows:-

D:\>jar cvmf MyApp.jar manifest.mft Main.class
java.io.FileNotFoundException: MyApp.jar (The system cannot find the file specif
ied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.tools.jar.Main.run(Main.java:131)
at sun.tools.jar.Main.main(Main.java:1022)

*************
when i execute the follwing exception comes

please suggest how can I create executable MyApp.jar,if you only provide the commad to create the MyApp.jar then i will get it.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you've written "jar cvmf", with the "m" coming before the "f", you have to put the name of the manifest file stub before the name of the jar file on the command line. The jar command is trying to use the (nonexistent) jar file as the manifest stub.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!