HELP ! Make an auto-exe main program in Java

How can i make an auto-exe main program in java. It can be an exe or an auto jar file.I'd like to understand how making a java main file that can be load like an exe on window for example...thanks
[225 byte] By [xorphee] at [2007-9-26 3:22:22]
# 1

First, compile your program.

C:\my_java_files> javac *.java

Then, you'll need to create a manifest file.

C:\my_java_files> copy con manifest.mf

Manifest-Version: 1.0

Created-By: 1.3.1 (Sun Microsystems Inc.)

Main-Class: MyProgram

^Z

The blank line at the end it required.

The last step is to make the JAR:

C:\my_java_files> jar cvfm MyProgram.jar manifest.mf *.class

nerd2004 at 2007-6-29 11:40:02 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 2
You might need to edit the association for .jar files. The actions should be:Run"C:\java\1.3\bin\javaw.exe" -jar "%1"Run at &Command Prompt"C:\java\1.3\bin\java.exe" -jar "%1"
nerd2004 at 2007-6-29 11:40:02 > top of Java-index,Other Topics,Java Community Process (JCP) Program...