What do you use to create JAR file?
This is a part of my Ant buildfile:
<jar destfile="file.jar">
<fileset dir="classes"/>
<manifest>
<attribute name="Main-Class" value="package.Main"/>
</manifest>
</jar>
Sir,
say the example is that i have a calculator developed by me n
i want to load it into the bean box .......
so i use the command ..
jar cfm calc.jar calc.mft calc.class
so from the above command the .mft file is not being recognised by the system n it is giving ....
E:\CALC>jar cfm calc.jar calc.mft calc.class
java.io.FileNotFoundException: calc.mft (The system cannot find the file specifi
ed)
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)
Ok. I have used jar wrom CygWin and it says (in such case):
Invalid manifest file specified.
Lets see at your example:
E:\CALC>jar cfm calc.jar calc.mft calc.class
calc.jar - the .jar file that will be created in E:\CALC folder
calc.mft - the manifest file should exist in E:\CALC folder
calc.class - the class file should also exist in E:\CALC folder
Check the name of calc.mft twice.
Is it exist in your folder?