File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Difficulty in adding own manifest file    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Difficulty in adding own manifest file    " Watch "Difficulty in adding own manifest file    " New topic
Author

Difficulty in adding own manifest file

amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
I create a folder w in which i have a java class in package my.Wen i use
D:\>jar cf qwe.jar w
jar file successfully creataed
but when i add a manifest file which has content
Main-Class: my.Test

I also press enter after my.Test
Now when i execute it in cmd
D:\>jar cmf qwe.jar man w
i get this error
java.io.FileNotFoundException: qwe.jar (The system cannot find the file specified)
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:122)
at sun.tools.jar.Main.main(Main.java:903)
I didn't understand this error
Thanks
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3426
    
  12
The manifest file has to come before the jar file.
Try
jar cmf man qwe.jar w


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difficulty in adding own manifest file
 
Similar Threads
How to create an executable in java
error while using jar -tvf file.war
problem in jar file creation?
updating a file with in ejb.jar of the ear
Installing Library Source