filmov
tv
How To Deploy Executable JavaFX 18 JAR Using IntelliJ 2021.3.3 on Windows 11 x64 (Fixed)
![preview_player](https://i.ytimg.com/vi/NbJWsfnTETw/maxresdefault.jpg)
Показать описание
This tutorial shows you how to deploy an executable JavaFX 18 application jar file using IntelliJ 2021.3.3 on Windows 11 x64. It contains JavaFX application with JavaFX library and DLL (.dll) files that can be accessed by a Windows program. In this way, you can run your JavaFX application by simply double clicking the jar file.
Important!!!
For IntelliJ 2021.3.3, Directory for META-INF/MAINFEST.MF: is not correct! It comes with C:\Users\Ken\IdeaProjects\demo\src\main\java or C:\Users\Ken\IdeaProjects\demo\src\main\resources, when you create a JAR file. As a result, when you click your JAR file, it does not run!
To fix this problem, you have to change Directory for META-INF/MAINFEST.MF: to C:\Users\Ken\IdeaProjects\demo\src, and then it will work. As far as I remember, we don't have this problem with older versions of IntelliJ 2021.3.x.
Java installation directory.
C:\Program Files\Java\jdk-18
JavaFX installation directory.
C:\Program Files\Java\javafx-sdk-18
Setting Environment Variables
JAVA_HOME="C:\Program Files\Java\jdk-18"
JAVA_HOME tells your OS where there Java installation directory lives.
PATH="%JAVA_HOME%\bin"
PATH specifies where the Java executable directory resides.
If it complaints about an existing MANIFEST.MF file, you can remove it from out/production/demo/META-INF/. demo refers to your project name.
VM options
--module-path "C:\Program Files\Java\javafx-sdk-18\lib"
JDK 18
JavaFX SceneBuilder 17.0.0
IntelliJ IDEA 2021.3.3
Windows 11 Pro x64
#JavaFX18 #ExecutableJar #DeployJar #CreateJar
Important!!!
For IntelliJ 2021.3.3, Directory for META-INF/MAINFEST.MF: is not correct! It comes with C:\Users\Ken\IdeaProjects\demo\src\main\java or C:\Users\Ken\IdeaProjects\demo\src\main\resources, when you create a JAR file. As a result, when you click your JAR file, it does not run!
To fix this problem, you have to change Directory for META-INF/MAINFEST.MF: to C:\Users\Ken\IdeaProjects\demo\src, and then it will work. As far as I remember, we don't have this problem with older versions of IntelliJ 2021.3.x.
Java installation directory.
C:\Program Files\Java\jdk-18
JavaFX installation directory.
C:\Program Files\Java\javafx-sdk-18
Setting Environment Variables
JAVA_HOME="C:\Program Files\Java\jdk-18"
JAVA_HOME tells your OS where there Java installation directory lives.
PATH="%JAVA_HOME%\bin"
PATH specifies where the Java executable directory resides.
If it complaints about an existing MANIFEST.MF file, you can remove it from out/production/demo/META-INF/. demo refers to your project name.
VM options
--module-path "C:\Program Files\Java\javafx-sdk-18\lib"
JDK 18
JavaFX SceneBuilder 17.0.0
IntelliJ IDEA 2021.3.3
Windows 11 Pro x64
#JavaFX18 #ExecutableJar #DeployJar #CreateJar
Комментарии