728x90 AdSpace

LATEST BUZZ

Bell's Branding

Monday, October 17, 2016

How to Create an Executable Desktop File and Icon from Eclipse







How to Create an Executable File from Eclipse


Part 1 of 3: Exporting from Eclipse

  1. Create an Executable File from Eclipse Step 1.jpg
  2. 1
  3. 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.
  4. Create an Executable File from Eclipse Step 2.jpg
  5. 2
  6. Right click your project and click "Export".
  7. Create an Executable File from Eclipse Step 3.jpg
  8. 3
  9. Expand the "Java" folder and double click the "Runnable JAR file" option.
  10. Create an Executable File from Eclipse Step 4.jpg
  11. 4
  12. 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".
    • Secondly, select the "Export destination" via the "Browse..." button or by manually typing the location.
    • Create an Executable File from Eclipse Step 4Bullet1.jpg
    • 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.
    • Create an Executable File from Eclipse Step 4Bullet2.jpg

Part 2 of 3: Creating an Icon

  1. 1
  2. 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.
  3. Create an Executable File from Eclipse Step 6.jpg
  4. 2
  5. Go to convertico.com. This is a free site that converts common image files (.png, .jpg) to a usable icon file (.ico).
  6. Create an Executable File from Eclipse Step 7.jpg
  7. 3
  8. 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. Create an Executable File from Eclipse Step 8.jpg
  2. 1
  3. Download launch4j. This is a free program designed to compile all your resources into one executable file. You can download launch4j fromhttp://sourceforge.net/projects/launch4j/files/launch4j-3/3.1.0-beta1/.
  4. Create an Executable File from Eclipse Step 9.jpg
  5. 2
  6. In the first text field, type or select via browsing the location you want you executable file to be stored. Make sure the filename has “.exe” at the end of it!
  7. Create an Executable File from Eclipse Step 10.jpg
  8. 3
  9. In the second text field, type or select via browsing the .jar file previously exported from Eclipse.
  10. Create an Executable File from Eclipse Step 11.jpg
  11. 4
  12. 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.
  13. Create an Executable File from Eclipse Step 12.jpg
  14. 5
  15. 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.
  16. Create an Executable File from Eclipse Step 13.jpg
  17. 6
  18. Click the gear button called “Build wrapper” at the top of the screen.
  19. 7
  20. 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!
<a href="https://eclipse.org/downloads/">How to Create an Executable Desktop File and Icon from Eclipse</a>
  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment

Top