Use of exe4j

xiaoxiao2021-03-06  90

source:

http://dev.9cbs.net/Article/39/39046.shtm

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. Here I use a name called EXE4J, I feel good.

First of all, of course, it is necessary to download an Exe4j. I am 2.2 version, license: L-G782DN2D-1F1YQXX1RV1SQD.

Then, will you choose to be released. Class files don't have to be said. Here is to create a JAR file. Here I use a name called D: myjavateest.class's file for the file. In addition, pay attention to the file manifest.mf to determine main_class, here mainfest.mf and directory myjava is in the same directory (Here are D :), then use the following command:

Jar Cvfm Test.jar Manifest.mf Myjava

Manifest.mf didn't know how to write, very crazy. . . Ha ha. In fact, it is very simple, the code is as follows:

Manifest-Version: 1.0main-class: myjava.testcreated-by: Hanic

As long as the main-class is written. 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.

EXE4J is quite simple to apply it. Similar to a fool, just all the way next, fill in and selecting individual parameters OK. It can be applied for a little more I understand. Don't say that you don't understand at a point! No way, simply say the process:

1. Open the exe4j, you can enter license, you can open the config file you have previously operated.

2. Click the Next button, select the JAR IN EXE MOD button, click Next.

3, fill in the path of the short name and file output and click Next.

4, 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 here, the name will take one according to your own needs, icon You can choose one you like in your icon library, then Next.

5, fill in the name of Main Class, click Green Select the desired .jar file, if there is no special requirements, we can continue.

6, next is the selected version, fill in your maximum minimum version and continue.

7, let's take a look at 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.

8. The following is a selection language version of the interface to choose after selecting.

9. The following is a short wait, then it is highly gone, and a Java write executable is generated in this way.

10, double click to look at the effect, keep your own start effect, how do you feel?

转载请注明原文地址:https://www.9cbs.com/read-96729.html

New Post(0)