Forums Register Login

Difficulty in adding own manifest file

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
The manifest file has to come before the jar file.
Try

jar cmf man qwe.jar w

 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1154 times.
Similar Threads
problem in jar file creation?
error while using jar -tvf file.war
updating a file with in ejb.jar of the ear
Installing Library Source
How to create an executable in java
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:35:45.