Tuesday, May 5, 2020

Steps to create executable file (exe) from jar package (jar).

Below are the Steps to create executable file (exe) from jar package (jar).


Step 1:- create executable jar for existing java application using eclipse.
Right click on the java file contains the main method.






Step 2 :-   select Runnable JAR file as next option.





Step 3:-  select java file with main class and click finish.



Step 4: - download launch4j , a utility with which we can convert executable jar file to exe file.



Step 5 :-  select output file and give the exe file name, then select the executable jar





Step 6:- select header tab and make sure GUI is selected as header type.




Step 7:-  select JRE header and add Min JRE Version (in my case its 1.8.0)




Step 8:-  select build wrapper.




Step 9:- add cfg file name and click on save it will create the exe file.