2

Possible Duplicate:
How can I convert my Java program to an .exe file?

How to make executable program in java?

Community
  • 1
  • 1
owen
  • 21
  • 1

3 Answers3

3

You don't really need to, there are a number of other options available:

CurtainDog
  • 3,175
  • 21
  • 17
1

probably this may help you http://www.javacoffeebreak.com/faq/faq0042.html

there he talks about nice tool called Java2Exe which serves your purpose

asela38
  • 4,546
  • 6
  • 25
  • 31
1

The common way is the following:

  1. compile your class files: javac *.class
  2. create a jar file (it's basically a .zip-file):
    • echo Main-Class: MyMainClassName > manifest.txt
    • jar cvfm MyOwnJarfile.jar manifest.txt *.class
  3. create a .bat-script (or sh script if your are on unix):
    • echo java -jar MyOwnJarfile.jar > start.bat
  4. Double-Click on start.bat ;-)
Philip
  • 3,470
  • 7
  • 29
  • 42