Original address: http://funine.iteye.com/blog/2220359
(All material in this document will be attached at the end of the article)
Preparation Tool exe4j, converticon.com (for making pictures in. ico format), JRE file pack
In fact, there are other ways to achieve this function, such as install4j to make, Jar2exe Wizard and Javalaucher together to make, but still think exe4j useful some.
So the experiment officially begins:
First, we need to prepare some experimental material: Export the jar package from development tool Eclipse
Finally, you export the jar file, double-click Test, if there is no reaction then you export correctly, there have been warnings and so on for so long mistaken. The later production will certainly not succeed.
The second step, find a picture of your program as your icon, note is in PNG format. Then make the icon.
We log in to this site http://converticon.com/
Click Continue.
and find the location of the PNG image you placed.
Pick one size and then one. ico format picture is OK.
Thirdly, we need to find out the directory of our JRE and then copy the JRE file and put it in the current folder
Note that jre1.8.0_45 does not choose the JDK
Finally, copy it and put it together with the prepared material. The preparatory work is over, let us Open the magic of the production tools!
The main content is the formal use of software production.
Directly double-click to perform file installation, this software is very interesting, each use to install, but very quickly. Just keep next on the line.
Click Next after the installation is finished
Select the first and then next
The above is the abbreviation of your program, can not fill in, the second is the path after the completion of packaging. Just choose the one in your folder.
Here is the file to add your jar, select the plus sign first
You can see that your jar file has been loaded in, and then the following is the place to select your program's main function
The first of the above is to choose the minimum version of the JRE, just fill in a not too much line, the following can not be filled, and then click on the Options bar below, select the first one.
The first one is information about the registry on your computer, so you have to delete it, or else he will find the location of the JRE and environment variables on your computer. Then select the plus sign to add your JRE file
Note Be sure to write relative path do not write absolute path
After the last addition, you can see that your path is. \jre1.8.
At the end of the page, there's nothing better to set up, just keep next.
There is a language choice here, but there is no Chinese, it will not be considered, but do not exclude the great God will choose what Japanese, Russian and so on. At last it's almost. Click Finish to be OK
This is fast.
Finally back to this page, leave it alone, and don't fork it off.
Then go back to your folder below, you can see that EXE file has been quietly lying there, and so what fast double-click it!
The sad is the wrong ... If your computer is the same as mine then you are also 64 bit, if the operation is successful there is nothing. Don't worry, we'll go back to that software.
According to the selection on the chart, put 64 on the √, click Finish, OK
Go back to this page, run, click OK, wait a few seconds, your program is OK.
Finally you can do the finishing, only need to leave three files on it, and you later, if the program changes, only need to replace the jar package on the line, do not need to repeat the EXE. There are three of these files can not be random, all in a folder Oh, Pro!
Thank you for watching this tutorial! Hope you in your friends circle, QQ Space and your friends and family deleted the applet! Add more fun to your life on the road to learning Java!
Link: http://pan.baidu.com/s/1qW3Jdm8 Password: 314d exe4j software
Link: Http://pan.baidu.com/s/1hqxTHuW Password: 5TCW This experimental material, JRE in the finished package below
Link: Http://pan.baidu.com/s/12jEmM Password: 5ez8 final product. (this game is made with my teammates)
Link: http://pan.baidu.com/s/1ntxJ5k1 Password: Wolb Double version greedy cat game program source code, I hope we have a lot of advice, learn from each other.
The most detailed version in history! Java files packaged as EXE, run on non-provisioned JDK and non-configured PCs-reproduced