How to Create an Executable File from Eclipse

Right click your project and click "Refresh"., Right click your project and click "Export". , Expand the "Java" folder and double click the "Runnable JAR file" option. , Configure the specifications of the JAR file., Find or create an image that...

18 Steps 2 min read Advanced

Step-by-Step Guide

  1. Step 1: Right click your project and click "Refresh".

    Alternatively you can right click and hit F5 on your keyboard.

    This is to ensure all your code is up to date and won't conflict when trying to export.
  2. Step 2: Right click your project and click "Export".

    ,, The first thing you should do is select the main class (class with the main method) from the drop down menu under "Launch configuration".

    Secondly, select the "Export destination" via the "Browse..." button or by manually typing the location.

    Lastly, ensure the "Extract required libraries into generated JAR" radio button is selected.

    Do not worry about the rest of the menu.

    Click "Finish" when you are satisfied with your selections. , Remember, the icon is the picture the user will click on whenever they load your program, so it will be seen often! Try to pick a memorable or descriptive image.

    The image size must by 256x256 in order to work properly as an icon. , This is a free site that converts common image files (.png, .jpg) to a usable icon file (.ico). , Click the “Go” button , This is a free program designed to compile all your resources into one executable file.

    You can download launch4j from http://sourceforge.net/projects/launch4j/files/launch4j-3/3.1.0-beta1/. , Make sure the filename has “.exe” at the end of it! ,, This is optional, and if left blank, your OS will revert to its default executable file icon. , This ensures that the users have a sufficient version of Java to use your program.

    This can be changed by you, but
    1.4.0 is a safe version. ,, The .xml file is standard, don't worry about it.

    Your executable file will now be created!
  3. Step 3: Expand the "Java" folder and double click the "Runnable JAR file" option.

  4. Step 4: Configure the specifications of the JAR file.

  5. Step 5: Find or create an image that will look appropriate with your program as an icon.

  6. Step 6: Go to convertico.com.

  7. Step 7: Either enter a URL or browse your computer’s files to locate the image you previously selected.

  8. Step 8: Download launch4j.

  9. Step 9: In the first text field

  10. Step 10: type or select via browsing the location you want your executable file to be stored.

  11. Step 11: In the second text field

  12. Step 12: type or select via browsing the .jar file previously exported from Eclipse.

  13. Step 13: In the fourth text field labelled “Icon:”

  14. Step 14: type or select via browsing the “.ico” file we previously converted.

  15. Step 15: Under the “JRE” tab at the top

  16. Step 16: select the “Min JRE version” and type in “1.4.0”.

  17. Step 17: Click the gear button called “Build wrapper” at the top of the screen.

  18. Step 18: Give the .xml file an appropriate name and click "Save".

Detailed Guide

Alternatively you can right click and hit F5 on your keyboard.

This is to ensure all your code is up to date and won't conflict when trying to export.

,, The first thing you should do is select the main class (class with the main method) from the drop down menu under "Launch configuration".

Secondly, select the "Export destination" via the "Browse..." button or by manually typing the location.

Lastly, ensure the "Extract required libraries into generated JAR" radio button is selected.

Do not worry about the rest of the menu.

Click "Finish" when you are satisfied with your selections. , Remember, the icon is the picture the user will click on whenever they load your program, so it will be seen often! Try to pick a memorable or descriptive image.

The image size must by 256x256 in order to work properly as an icon. , This is a free site that converts common image files (.png, .jpg) to a usable icon file (.ico). , Click the “Go” button , This is a free program designed to compile all your resources into one executable file.

You can download launch4j from http://sourceforge.net/projects/launch4j/files/launch4j-3/3.1.0-beta1/. , Make sure the filename has “.exe” at the end of it! ,, This is optional, and if left blank, your OS will revert to its default executable file icon. , This ensures that the users have a sufficient version of Java to use your program.

This can be changed by you, but
1.4.0 is a safe version. ,, The .xml file is standard, don't worry about it.

Your executable file will now be created!

About the Author

J

Joshua Morales

Professional writer focused on creating easy-to-follow lifestyle tutorials.

79 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: