2

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

How to make executable program in java?

1
  • You mean how to make a literal .exe binary from a class file or jar package? Commented Nov 4, 2010 at 3:57

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

I particularly like the 3rd suggestion, which will work on Windows, Linux and Mac.
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

Comments

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 ;-)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.