filmov
tv
How To Deploy Java 23 exe and msi Installers Using JPackage on Windows 11 x64 (Updated)

Показать описание
In this guide, I'll explain how to use the JPackage tool to create a self-contained JavaFX 23 application with all the required dependencies. This will let us build a native installer, like an .exe or .msi file, for Windows 11 x64. Make sure you're using the same version of Java and JavaFX. For example, if you're using JDK 23.0.1, make sure you also use JavaFX 23.0.1.
To create EXE or MSI installers, you will need a third-party library called the WiX Toolset (version 3.0 or later).
You should download and install the following:
The Installed directories are as following:
C:\Program Files\Java\jdk-23.0.1
C:\Program Files\Java\javafx-sdk-23.0.1
C:\Program Files\Java\javafx-jmods-23.0.1
C:\Users\Ken\AppData\Local\SceneBuilder
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.3.1
C:\Program Files (x86)\WiX Toolset v3.14
Source:
Usage Examples
1. Create an EXE file for Windows
--type exe: Creates a Windows executable (.exe) installer.
--win-shortcut: Creates a shortcut for the application in the Start Menu.
--win-menu: Creates a menu entry for the application in the Windows Start Menu.
2. Create an MSI file with versioning
--type msi: Creates an MSI (Microsoft Installer) file.
--app-version "2.0": Specifies the version of the application.
3. Create MSI with a custom application name
--name "My App": Sets the name of the application in the installer.
4. Create MSI with description
--description "JavaFX 23 Hello World App": Adds a description to the installer.
5. Create MSI with an icon
6. 1 Create a custom runtime with jlink
6.2 Use jpackage to package your application with the custom runtime
7. Verbose logging for debugging
--verbose: Provides detailed logging for debugging and troubleshooting the packaging process.
To create EXE or MSI installers, you will need a third-party library called the WiX Toolset (version 3.0 or later).
You should download and install the following:
The Installed directories are as following:
C:\Program Files\Java\jdk-23.0.1
C:\Program Files\Java\javafx-sdk-23.0.1
C:\Program Files\Java\javafx-jmods-23.0.1
C:\Users\Ken\AppData\Local\SceneBuilder
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.3.1
C:\Program Files (x86)\WiX Toolset v3.14
Source:
Usage Examples
1. Create an EXE file for Windows
--type exe: Creates a Windows executable (.exe) installer.
--win-shortcut: Creates a shortcut for the application in the Start Menu.
--win-menu: Creates a menu entry for the application in the Windows Start Menu.
2. Create an MSI file with versioning
--type msi: Creates an MSI (Microsoft Installer) file.
--app-version "2.0": Specifies the version of the application.
3. Create MSI with a custom application name
--name "My App": Sets the name of the application in the installer.
4. Create MSI with description
--description "JavaFX 23 Hello World App": Adds a description to the installer.
5. Create MSI with an icon
6. 1 Create a custom runtime with jlink
6.2 Use jpackage to package your application with the custom runtime
7. Verbose logging for debugging
--verbose: Provides detailed logging for debugging and troubleshooting the packaging process.
Комментарии