How to Create an Executable File from Eclipse
Part 1 of 3:
Exporting from Eclipse
- 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.
- 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. 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.
Part 2 of 3:
Creating an Icon
- 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.
- Go to convertico.com. This is a free site that converts common image files (.png, .jpg) to a usable icon file (.ico).
- 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
- 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/.
- 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!
- In the second text field, type or select via browsing the .jar file previously exported from Eclipse.
- 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.
- 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.
- Click the gear button called 'Build wrapper' at the top of the screen.
- 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
You should read it
- How to Enlarge Thumbnails and Icons in File Explorer
- Corel Draw: Draw the Windows XP icon
- How to Create a Windows Icon
- How to Invert Scrolling on a Mac
- Steps to change icons for specific file formats in Windows
- How to Reverse Mouse Scrolling on Mac
- How to Restore Deleted Files in Windows XP
- How to Hide a File or Folder from Search Results in Microsoft Windows
May be interested
- Tips on how to effectively disable Antimalware Service Executablewhat is antimalware service executable? what are the effective ways to disable antimalware service executable to reduce and prevent full cpu load?
- America must prepare 'carefully' for the Japanese Food Festival which will take place on August 21the solar eclipse of august 21 will affect the us solar grid
- Create private cloud with Hyper-V (Part 5)the series has focused primarily on creating executable image files that can be used to create new virtual machines on it. however, these executable files won't work unless we have a private cloud infrastructure that allows legitimate users to create new virtual machines on demand. today's lesson will guide users to build
- Total solar eclipse in North America 'most impressive in hundreds of years'on april 8, some places in north america witnessed a total solar eclipse - a scene considered 'once in a lifetime'. this total solar eclipse - nicknamed the great american eclipse because of its long path across north america - appeared in the sky over parts of mexico, 15 us states and eastern canada. .
- Mysterious blue crescent decoding in many photos of total eclipse in Americain the moment the sun disappeared in the sky of america, many people were fortunate to capture one of the most remarkable astronomical phenomena this year. in some of those photos, many people were startled when they saw a mysterious little blue crescent.
- How to create an EXE installation filesometimes to install certain software on your computer, you must use the .exe file, but have you ever wondered what the purpose of this file is and how it was created? in this article, tipsmake.com will answer that question and guide you to create an exe installation file.
- Detection of a rare comet appearing during a total solar eclipseon april 8, just a few hours before the total solar eclipse, an amateur astronomer discovered a small comet 'sungrazer' very close to earth and took a picture of it before the eclipse. completely decomposed.
- Deciphering the 'natural wind' mysteriously caused the researchers a headachethat's when an eclipse happens, the air will become unusually cold and wet, a shuddering and frightening feeling like watching horror movies.
- August 21, 2017: NASA will broadcast 360-degree videos directly on Facebook's transcontinental eclipse phenomenon on Facebook, you can seeon august 21, 2017, the transcontinental solar eclipse will take place in the us and facebook will send an invitation to watch the most spectacular astronomical event of 2017 by nasa to you.
- Instructions for creating and using BAT file on Windowshow to create a simple batch file and some basics about it will be presented in this article. at the same time you will be provided with some resources for learning and writing batch files.