In this blog, you will learn to set up JavaFX 16 and Java Development Kit (JDK) in NetBeans IDE. If you’re a beginner in JavaFX this is the right tutorial for you. So, let’s get started. First of all, we will download the necessary files for setting up JavaFX. What we need is the JavaFX SDK and Java Development Kit (JDK).
Files to download
You can download the JavaFX SDK and Java Development Kit (JDK) below. Download links are given, all you need to do is to click the link below.
Download the JavaFX SDK latest version – Download now
Download the Java Development Kit (JDK) version 1.8 or JDK 8 – Download now
Step by step to Set up JavaFX 16 with JDK 1.8 in NetBeans IDE
Setting up the Java Development Kit (JDK)
Install your Java Development Kit (JDK). Once you have successfully installed the JDK, then open your IDE and go to the Java Platforms, Click on Tools from the Menu bar.
Once you are in the Java Platform Manager window, then click on Add Platform in the lower-left corner. Select the Java Standard Edition from the Platform type.
Then, find the JDK in the installation folder. Once you’ve found it, select the JDK and click on next.
You can change the name of your JDK or leave it by default and click on Finish.
Set up JavaFX 16 SDK
It is better to add or set up JavaFX 16 SDK to the Global Library.
Click again on Tools from the Menu Bar and select the menu item Libraries. This is how to add the global library.
To add a new library, click on the New Library at the lower-left of the window beside the Remove button.
Change the name of your library, for example “JavaFX 16” and click on OK.
Add a Jar/Folder on the right side of the window. Find the JavaFX SDK, If you haven’t extracted the JavaFX file, then extract it and go to the lib folder inside of it. Select all the jar files, not including the src.zip
That’s it, click on the Ok button when you’re done.
If you’re still confused about this tutorial. You can watch the YouTube video below to demonstrate how to set up JavaFX and JDK. You can also watch how to create a new JavaFX project.