How to Create an Executable File from Eclipse

Part 1 of 3:

Exporting from Eclipse

  1. How to Create an Executable File from Eclipse Picture 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. How to Create an Executable File from Eclipse Picture 2
    Right click your project and click "Export".
  3. How to Create an Executable File from Eclipse Picture 3
    Expand the "Java" folder and double click the "Runnable JAR file" option.
  4. How to Create an Executable File from Eclipse Picture 4
    Configure the specifications of the JAR file. The first thing you should do is select the main class (class with the main method) from the drop down menu under "Launch configuration".
    1. Secondly, select the "Export destination" via the "Browse..." button or by manually typing the location.
    2. 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.
Part 2 of 3:

Creating an Icon

  1. How to Create an Executable File from Eclipse Picture 5
    Find or create an image that will look appropriate with your program as an icon. 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.
  2. How to Create an Executable File from Eclipse Picture 6
    Go to convertico.com. This is a free site that converts common image files (.png, .jpg) to a usable icon file (.ico).
  3. How to Create an Executable File from Eclipse Picture 7
    Either enter a URL or browse your computer's files to locate the image you previously selected. Click the 'Go' button
Part 3 of 3:

Create the Executable File

  1. How to Create an Executable File from Eclipse Picture 8
    Download launch4j. 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/.
  2. How to Create an Executable File from Eclipse Picture 9
    In the first text field, type or select via browsing the location you want your executable file to be stored. Make sure the filename has '.exe' at the end of it!
  3. How to Create an Executable File from Eclipse Picture 10
    In the second text field, type or select via browsing the .jar file previously exported from Eclipse.
  4. How to Create an Executable File from Eclipse Picture 11
    In the fourth text field labelled 'Icon:', type or select via browsing the '.ico' file we previously converted. This is optional, and if left blank, your OS will revert to its default executable file icon.
  5. How to Create an Executable File from Eclipse Picture 12
    Under the 'JRE' tab at the top, select the 'Min JRE version' and type in '1.4.0'. 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.
  6. How to Create an Executable File from Eclipse Picture 13
    Click the gear button called 'Build wrapper' at the top of the screen.
  7. How to Create an Executable File from Eclipse Picture 14
    Give the .xml file an appropriate name and click "Save". The .xml file is standard, don't worry about it. Your executable file will now be created!
3.9 ★ | 7 Vote

May be interested

  • How to Print Double Quotes in JavaPhoto of How to Print Double Quotes in Java
    you've discovered that the double quote symbol ' will not work inside a java print instruction. you'll need to find an alternate way to tell the compiler to print this symbol, instead of interpreting it as instructions to close the string....
  • How to Check Java Version on a MacPhoto of How to Check Java Version on a Mac
    this wikihow will teach you how to check what version of java you have installed on your mac by checking the system preferences, using the java website, or by using your mac's terminal. click . it's the apple icon in the upper-left of the...
  • How to Check Null in JavaPhoto of How to Check Null in Java
    a null indicates that a variable doesn't point to any object and holds no value. you can use a basic 'if' statement to check a null in a piece of code. null is commonly used to denote or verify the non-existence of something. within that...
  • How to Compile & Run Java Program Using Command PromptPhoto of How to Compile & Run Java Program Using Command Prompt
    while many programming environments will allow you to compile and run a program within the environment, you can also compile and run using command prompt. both windows and mac have their own versions of command prompt, although it is...
  • How to Check Your Java Version in the Windows Command LinePhoto of How to Check Your Java Version in the Windows Command Line
    this wikihow teaches you how to check what version of java you have installed on your windows computer using command prompt. click the windows start icon. it's the icon with windows logo. by default, it's in the bottom-left corner of the...
  • ! = and! == What is the difference in JavaScript?Photo of ! = and! == What is the difference in JavaScript?
    javascript includes operators like in other languages. an operator performs some operations on one or more operands (data values) and produces a result. today's article will help readers learn about 2! = and! == operators in javascript.