Wednesday 13 June 2012

Build an exe for your Java Program

Build an exe for your Java Program

Instruction

I write this manual because that my Data Structures Course teacher ask us to hand our Java program in as a .exe file, but some of my classmates don't know how to do it.



1. You need to build a .jar file for your program.

  *eclipse
     File > Export > Runnable Jar File > Launch Configuration(choose the program that you just run) > Choose the export path and File name.

  *Fat Jar
     File > Build a Fat Jar > Choose the File name and Main Class > Next > Add a library or Package > Finish(The jar file will export to your workspace/*porject name/*)

2. Then Download JSmooth Here

3. Application > choose "Use an embedded Jar" > Use the Jar File that you just export > Choose Main Class

4. Executable > choose the Binary and "File Name.exe"

5. Skeleton > if you have windows than choose "Windowed Wrapper", you choose "Console Wrapper"

6. Click the Gear Icon on the top -> choose the path that you tend to export

7. Done

0 comments:

Post a Comment