How To Deploy an Executable JavaFX 19 JAR, exe, msi Using IntelliJ 2022.3.1 on Windows 11 x64 (1-3)

Опубликовано: 04 Октябрь 2024
на канале: Ken
1,669
19

This tutorial guides you in deploying an executable JavaFX 19 application jar file using IntelliJ 2022.3.1 on Windows 11 x64. The jar file contains the JavaFX application and its associated JavaFX library and .dll files, allowing it to run on Windows just by double-clicking the jar file.

The location of the .jar file can be found in the out/artifacts folder.

Java is installed in the following directory:
C:\Program Files\Java\jdk-19

JavaFX is installed in the following directory:
C:\Program Files\Java\javafx-sdk-19.0.2.1

VM Options
--module-path "C:\Program Files\Java\javafx-sdk-19.0.2.1\lib"
--add-modules javafx.controls,javafx.fxml

Leaving a space between the two module names, like this: --add-modules=javafx.controls, javafx.fxml, may result in a syntax error. Therefore, it is important to ensure that there is no space between the module names when using the --add-modules option with JavaFX.

JDK 19.0.2
JavaFX SceneBuilder 19.0.0
IntelliJ IDEA 2022.3.2
Windows 11 Pro x64

#JavaFX​​19 #ExecutableJar​​ #DeployJar​ #CreateJar