hi I saw some jar file which run just like exe files, where you can double click and run. I tried to create my owen executable jar file by usimg jar command. i created the jar file but does not execute when double click it. What is wrong with that? Pls some body help me.
Joined: Nov 05, 2000
You need to include a manifest file which tells the JVM which class should be loaded first.Create a text file and add a line like this Main-Class: YourMainClass do not use .class extension just the class name. And add this to your jar archive in a subdirectory called meta-inf . Alternately you can use the jar utility to create the manifest file. Finally it may be necessary to create the necessary association for files with .jar extension before the OS can invoke the correct program to run this file with. Rgds Sahir