Objective
Previous article http://blog.csdn.net/chaiwenjun000/article/details/51967864
This article describes how to export a jar package with a database connection, and now we use exe4j to encapsulate the jar package as an EXE executable file.
0th step, prepare.
First, export the jar package from the previous article http://blog.csdn.net/chaiwenjun000/article/details/51967864, and place the resource file in a folder.
In addition, copy the JRE package from the Java installation directory, as shown here!
The first step, download exe4j, this will not need me to teach, own Baidu one. The second step, open the Exe4jwizard, the following screen appears
Click Next directly.
Choose Jarmode, Direct next.
Enter the name of the app and the exported directory, and the export directory directly selects the folder you created earlier.
Select the app type, apply the name, apply the icon, and then go directly to next.
This VM environment, parameters, direct replication-dexe.path=${exe4j_exedir} paste.
Then, click the Green Plus button to add the jar package.
Choose your own jar packages, and the Mysql-connector-java that you need. After exporting as
Then select the main class.
Choose success directly next.
Then select the minimum maximum JRE version. Allo JREs with a beta version number also ticked
Then click the Advanced options and click Search Sequence.
Delete the 3 directories that already exist
Then select the JRE directory in the export directory.
When selected. Then direct directly to next.
Select the client Hostpot VM.
This spash screen splash, do not care about him here, the choice may be our manifest file needs to change, here is not the first choice.
Direct next.
Wait, the production is complete, and then click here to Start the application will be able to run, or to the project export directory to open.
Reference: http://blog.csdn.net/yicomm/article/details/6681404 Blogger's article, but he this article does not take me to pack with the database program, here again edited again.
Thank the blogger Yicomm.
Publish a Java program with a database with exe4j