File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difficulty in adding own manifest file

 
amit sharma
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The manifest file has to come before the jar file.
Try
jar cmf man qwe.jar w
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic