HOW TO CREATE AN .EXE FILE ?
Make sure the project is compiled and run properly.
Step 1: Make runnable jar file of project.
Step 2: Use Launch4j to configure.
Step 3: Save configuration.
Step 4: Build Wrapper.
Here we have taken a java project built in Eclipse IDE. Go to the project in Eclipse IDE.
Runnable jar file
Software Required
Now we need a software named Launch4j
1. Install Launch4j
2. Extract zip file.
3. Run Launch4j.exe
1. Start Launch4j software
2. Go to Basic tab.
3. In Output file section
a. Browse project folder in workspace
b. Named the file as myschedule.exe
4. In Jar section
a. Browse myshedule.jar (previously created jar file).
5. As per requirement Classpath and Header tabs can be configured.
6. Go to Single instance tab.
a.
Select Allow only a single instance of the application
i. Selection will make sure, there will be a single window of
application running at a time.
b.
Fill up the Mutex name
i. Here myschedule given to
mutex name
ii. You should also give a window title.
7. Go to JRE tab
a.
Here you can provide Min JRE version to the executable
environment.
b. Our project built in 1.8.0, so it is filled up.
8. As per requirement Set env. variables and Splash tabs can be configured.
9. Go to Version Info tab.
a.
You can customize as per your
requirements
b.
Select Add version information.
c.
File version: 1.0.0.0
i. Make sure format of version looks like x.x.x.x
d.
Free form: 1.0.0.0
e.
File description: myschedule
i. you can describe your project here.
f. Copyright: 2020
g.
Addition information
h.
Product version: 1.0.0.0
i.
Free form: 1.0.0.0
j.
Product name: myschedule
k.
Company name: Uniconverge Technologies
Pvt. Ltd.
l.
Internal name: myschedule
m.
Original filename: myschedule.exe
i. Extension in compulsory here
10. In Messages tab some messages can be given for the particular event.
11. Now click Save icon
a.
Go to the project folder
b.
Make a folder Launch4j config
c.
Enter the Launch4j config
folder
d.
Name the file config
e.
Save it
12. Click Build wrapper (setting icon)
13. You will see a message in log
14. myschedule.exe is created in project folder
15. If you double click on myschedule.exe, you can see your project is running properly.
No comments:
Post a Comment