Although wrapping a jar in an executable .exe file doesn't make any sense as it can be extracted easily using tools like WinRAR ;) u can still avail the benefits of it if u want to deploy your application at a no-programmer client side . Here are the steps in which you can create an .exe file for a project .
For this you'll need Launch4j ..so download and install Launch4j .. and run it ..once the launch4j application starts .. do the following steps (assuming that you've successfully completed your project and the project runs fine without displaying any errors)
1:- Click on new Configuration menu .
2:- When a popup window appears saying discard chandes.. click on yes
3:-Now Select the path to your output file (suppose you wanna create a executeable named project.exe in D:\ directory then your path to output file woould be D:\project.exe )
4:-Select your project Jar File .
4:- Leave manifest Textfield as it is .
5:- Select your icon file for your executable .exe file
6:-Leave other tabs on the basic tab as it is .
7:-Leave all fields in Classpath tab as it is .
8:-Leave all filds in Header tab as it is.
9:-In single instance tab .. select allow single instance checkbox and enter the process name for your application in the remaining two fields on single instance tab.
10:- In jRE tab .. Min JRE Version (Java Runtime version) for your application and leave all other fields as it is .
11:-Leave all fields in set env variables tab as it is .
12:-Leave all fields in splash tab as it is.
13:-Enter your project version in version info tab .
14:-And finally .. in Messages tab ..uncheck add custom messages .
15:-Now click on the build wrapper menu ..so that your .exe file will get created in the location you had specified in step 3.
16:-Hence your .exe file gets created ..
Done !!



No comments:
Post a Comment