[Java] java | Package the executable jar into an exe executable file

1. Description

        1. Javafx desktop program, but do not want to install jre environment

        2. The executable jar needs to be packaged into exe

        3. Use the tool exe4j

2. Operation steps

1. Download exe4j

https://exe4j.apponic.com/

2. Installation

Instruction 1: Create an exe4j folder on the d drive

Instruction 2: Create an output file jar to store the generated exe

3. Run

4. Catalog introduction

Welcome: tool introduction; Open can open historical configuration files;

Project type: It is newly created, choose the packaging method; use "JAR in EXE" mode

Application info: packaged application information; one is the name of the exe; one is the output directory

Execurable info: Executable program configuration; detailed configuration is required, which will be introduced later

Java invocation: jar package and startup class

JRE: The local jre path, which needs to be typed into the exe

Splash screen: The translation is "splash screen", which is not used and ignored

Message: Configuration information description, it is a confirmation page, go to the next step

Compile executable: Compile exe program, packaging process, automatic completion

Finished: The packaging is complete, you can go to the ouput directory to confirm the exe, there will be a prompt if there is an error, if there is no exe, it means that there is a problem with the configuration

Starting from 5, for detailed configuration steps

5. Select the type

6. Configure basic information and exe output path

7. Enter basic information

 

 8. Configure the startup user

 9. Configure jar

-Dfile.encoding=utf-8

 10. Configure jre

 11. Choose jvm

12. The next two steps do not need to be configured, it is a confirmation process, directly to the next step

 

Explanation 1: Compile exe... is automatically executed, and it will go directly to 10Finished without reporting an error

13. It is successful when you see the exe description

Note 1: If an error is reported, an error.log log will be generated; what problems can be searched for

14. Double-click to run the verification, the function is no problem, no error is the final OK

Description: Good luck

~~

Guess you like

Origin blog.csdn.net/myloverisxin/article/details/130610525