JavaFX Tutorial 58 - Executable JavaFX 8 Application JAR File

preview_player
Показать описание
This tutorial shows you how to create an executable JavaFX application jar file using NetBeans 12, which contains application code and resources and can be launched by double-clicking the file.

You should download the following:

Setting Environment Variables

JAVA_HOME="C:\Program Files\Java\jdk1.8.0_261"

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 8 version of the language and runtime.

 The Installed directories are as following:

C:\Program Files\Java\jdk1.8.0_261
C:\Program Files\NetBeans-12.0

Q: I got an error of

JavaFX deployment library not found in active JDK.
Please check that the JDK is correctly installed and its version is at least 7u4 on Mac or 7u6 on other systems.
BUILD FAILED (total time: 3 seconds)

A: For Java/JavaFX deployment, we may still need to use Java 8. JavaFX deployment with NetBeans 12 comes with Apache Ant version 1.10.4 that does not support Java 11 or higher. It supports only up to Java 8. As far as I know, any IDE uses an Ant library, it can't support Java 11 or higher for deploying Java/JavaFX 11 for now.

#JavaFX #JavaFXJar #JavaFXdeployment
Рекомендации по теме
Комментарии
Автор

Thank you, so much. Gonna try this out on intelij.

warriorgirl
Автор

hi, im getting the following error while clean and build my project
error : Unable to create javax script engine for javascript
any suggestion? thanks

younuselazzouzi
Автор

Thank you so much for your video it helped me, like all your videos now! But I have a question, do you know when netbeans will update this apache so your compiler also works with JDK 17 and JAVAFX17?

naturalaprendizado
Автор

Hello
Sir, I made an app using
java swing +mysql
How can I convert this code with its mysql database into an application that I can install on my desktop or on any other computer?
Thanks

muhammadsalem
Автор

does this method work only using JDK 8 & Java FX 8?
on my PC I am using JKD 15 along with JavaFX 15.0.1 for building an application. What would the procedure should adopt? do you have any tutorial teaching how to build an EXE with JKD 15 / JavaFX 15?

edgarcostamelo
Автор

Hi sorry Sir my did not work I have Netbeans IDE 12.1 and JDK 14 and Javafx 14 Error: Could not find or load main class
Caused by:
Any help or solution to this

kcodesubfield
Автор

i have netbean 11.3, i developed a javafx app and build a jar file but does not run. how do i build an executable javafx jar file. this is the error i got. Error: Could not find or load main class Main.main
Caused by:

kcodesubfield
Автор

Hi, can you show how can I convert my JavaFX project to .EXE file?

Attee_Q