Generate a Java weaving executable
After weaving Java into .CLASS, if you only use the java command to perform, you always don't be too interested, find a way to generate the file like an EXE file to double-click the file that can be executed, it should be very interesting. This paper mainly introduces a method of generating Java executable program.
Here I use a name called EXE4J, I feel good. Below I will tell me the Java's .class file to tell the process of executable files.
First of all: Will you choose the .class file you are about to be released, the following is to create a JAR file, here I use a name called Test.class file for example, and pay attention to the file to determine the main_class file Manifest.mf, where Mainfest.mf and Test.class are in the same directory, then use the following command
Jar Cvfm Test.jar Manifest.mf Test
In this way, a Test.jar file is generated, here I will not say the specific function of JAR. However, in order to ensure success, we can use the following instructions to execute the Test.jar that has just been generated:
Java -jar Test.jar
How can it be smooth? If so, then we can start the creation of executable files.
The following opens EXE4J, and its starting interface is like this:
Click the Next button, select the JAR IN EXE "MOD button, click Next;
The following screen appears, fill in the path to the short name and file output and then click Next to continue
You will see the following screen, here you can choose the type of executable you want to generate, and the generated executable name, the icon of the executable file, etc., we will choose the GUI Application, the name is based on You need to take one, the icon you can choose one you like in your icon library, then NexT will continue again;
The next picture is as follows, here fills in the name of the main class, click on the green below to select the desired .jar file, if there is no special requirements, we can continue again;
Next is the selected version of the screen, fill in your biggest minimum, then continue
Below this picture can help you set up the title of your file, add its beautiful effect, choose your favorite picture, write the text you want to write, and adjust the location of the text as needed, continue
Below is a selection language version of the interface to choose another, continue
Below is a short wait,
Then I was very successful, and the executable written by Java was generated.
Double click to look at the effect, keep your own settings, how do you feel, is it like a spring breeze?
surface?