To prepare

Recently done a combination of the front and back end of the Spring Boot project, but the requirements into an EXE application, went to study for a long time, stepped on a lot of pits, write this article, is to see this article, according to my steps, can step on pits.

  • A JAR package, no bug can start jar package
  • Exe4j, a tool for converting a JAR to an EXE, links to:

Pan.baidu.com/s/1J30uUMJc…

Extraction code: 6ESR

Registration code: L-G782DN2D-1f1yQXX1Rv1SQd

Making exe

  • Otherwise, a pop-up window will pop up every time you run the License. Click Change License in the lower right corner

Key: L – f1yqxx1rv1sqd g782dn2d – 1

  • Encoding =gb2312; Windows console encoding= GB2312; Windows console encoding= GB2312;

  • \jre (1.8 or below with jre).\ JDK (11 with JDK), jdk11 will not run even if the jre package is generated on demand

  • Exe has been packaged, you can put your local JDK /jre (the same as the previous configuration./ JDK environment into the JDK) directory to try to run, if there is no problem next to the exe and runtime jre package

Making installation Packages

  • Inno Setup, a tool that combines dependencies with exe as an installer, links to:

Pan.baidu.com/s/1DgFo1ceM…

Extraction code: G9JD

  • Open inno Setup, top left corner file-new

  • The middle options go straight to the next step until the page fills in the output location and program name

  • Then the next step is to enter the interface and keep the default, just change the position of the arrow mark to change {app} to {app}/jre

  • Click the green triangle to run the script. When the green scroll bar ends, a setup.exe file will appear on your desktop

  • Double-click the installation package to install, find the installation directory to run exe program