Hello! to All, When I run the ".jar" file using: java -jar abc.jar The following error appears: Failed to load Main-Class manifest attribute from abc.jar. I updated the manifest.mf file in the META-INF folder of the abc.jar file, like that: Manifest-Version: 1.0 (I added) Main-Class: RF2 (Note: RF2 is the name of the class which contains the main() method, i.e, the applications entry point). But, nothing happend. Any advice will be regarded very very valueable.
Hi ABC (or is that DEF?), I didn't find any mention of JDK version or platform in your post, so I'm going to assume 1.4.1 on Windows, and refer you to the relevant documentation: http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/jar.html I'm also assuming that the "RF2" class is in the default package (i.e. _not_ in any package). First you need to create a text file and put the following line in it: Main-class: RF2 Note that you need to write it exactly as it appears above, and have an "empty" line after it (in other words, hit the <ENTER> key after typing the above line). So, to re-iterate, open "Notepad" (since you are using Windows), type the line shown above, hit <ENTER>, and save the file (under any name you like). Then create the JAR file. I don't know exactly what command you are using (since you didn't mention that, either), but it should start like this: jar cmf myManifestFile abc.jar <rest of command...> where "myManifestFile" is the file you created in "Notepad" (see above) and "abc.jar" is the name of the JAR file you wish to create. [Note: this assumes that "myManifestFile" is in the current directory.] Et voila, you should now be able to (successfully) execute the following command: java -jar abc.jar Hope this has helped you. Good Luck, Avi.