Skip to content
Advertisement

How to install JavaFX on Windows 10 Eclipse?

I was trying some instructions I found on the internet, but they are too old to be of use now with the latest Eclipse IDE release.

The code I am trying to run:

JavaScript

Error: Unable to initialize main class javafxbasics.ShowFlowPane in module JavaFXproject Caused by: java.lang.NoClassDefFoundError: Stage

Advertisement

Answer

Finally found a video how to do that: How to Set Up JavaFX to work in Eclipse 2020 version

That guy is a superhero. A couple of points:

  1. when you download and unzip the latest JavaFX SDK for Windows release from https://gluonhq.com/products/javafx/, copy the location of that folder on your hard drive, you will need it to set up the path to the lib folder inside that package.

  2. Here is the code which you will need to paste for the path: –module-path “your path to javafx-sdk-15.0.1lib” –add-modules javafx.controls,javafx.fxml

As of 03/11/2020 solution works with Eclipse Version: 2020-09 (4.17.0) Build id: 20200910-1200 and javafx-sdk-15.0.1

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement