1

I've attached a screenshot. I was trying to open and run a template to get a feel for java graphics. Should I download a different JDK version?Screenshot

I've tried youtube and google for answers.

  • JavaFX hasn't been part of the JDK since version 11 (possibly earlier, but I only look at long-term support versions, so 11 comes after 8). You need to install JavaFX separately. – passer-by Mar 22 '22 at 17:18
  • 3
    Documentation is in [getting started at openjfx.io](https://openjfx.io/openjfx-docs/). The easiest way is the [new JavaFX project wizard](https://www.jetbrains.com/help/idea/javafx.html) in Idea. Recent JDK versions which include JavaFX are available, [setup Zulu JDK FX in Idea](https://stackoverflow.com/questions/69633235/why-cant-idea-find-javafx-package-after-upgrade-javafx-project-to-jdk-17-using/69636003#69636003), but not necessarily needed. Ensure that whatever IDE and other software that you use is up to date. – jewelsea Mar 22 '22 at 17:21
  • 1
    See the video [How To install JDK 17 and JavaFX 17 on NetBeans IDE](https://youtu.be/VGlD8uJGJl8) and [the related article](https://kensoftph.com/how-to-instal-jdk-17-and-javafx-17-on-netbeans-ide/). – skomisa Mar 22 '22 at 21:10

1 Answers1

3

tl;dr

Download either ZuluFX or LibericaFX as your JDK.

Details

JavaFX has never been a part of standard Java SE.

To write and deploy a JavaFX app you must either:

  • Include a copy of the OpenJFX libraries within your app, or
  • Use a JDK that comes bundled with the OpenJFX libraries.

At least two vendors offer a JDK with OpenJFX bundled:

  • ZuluFX by Azul Systems
  • LibericaFX by BellSoft
Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154