How To Build an Executable JavaFX 15.0.1 Jar File Using IntelliJ 2020.2.4 on Windows 10 x64

preview_player
Показать описание
In this tutorial, I will show you how to build an executable JavaFX 15.0.1 application jar file using IntelliJ 2020.2.4, which contains application code and resources.

Setting Environment Variables

JAVA_HOME="C:\Program Files\Java\jdk-15.0.1"

JAVA_HOME tells your OS where there Java installation directory lives.

PATH="%JAVA_HOME%\bin"

PATH specifies where the Java executable directory resides.

Javac -version

The output should display a message indicating the Java 15 version of the language and runtime.

JavaFX installation directory.

C:\Program Files\Java\javafx-sdk-15.0.1

Java installation directory.

C:\Program Files\Java\jdk-15.0.1

IntelliJ IDEA Installation directory.

C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3

java -version
java version "15.0.1" 2020-10-20
Java(TM) SE Runtime Environment (build 15.0.1+9-18)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)

#JavaFX15 #Jar
Рекомендации по теме
Комментарии
Автор

Sir great video but observation Sir when you create different package whether in the same package or outside when you build, it show main class not found exception how do you go about this. [Using Interllij IDE, JavaFx 11, JDK 11] I have tied but still, Please help

kcodesubfield
Автор

You are the one Sir. I was so worried I would lose all the work I had done, you absolutelly saved me

Rafael-fthu
Автор

dude thank you i was getting so damn worried.

davidorlov
Автор

is it only possible to run the JAR file using the terminal command line?

edgarcostamelo
Автор

Hi Thanks for your solution it worked,
+ and I also used Launch4j to make an exe file from the jar,
- but it can't find css resources (are in different package and while running the app with the ide everything is ok and it will find them) and load them, what can i do?

pedrodelmaro
visit shbcf.ru