Installing JDK 14 & JavaFX for IntelliJ

  1. Download the JAVA SDK. I used JAVA 14 (jdk-14.0.1_osx-x64_bin.dmg) and installed.
  2. Download JavaFX, here I use v.14 (openjfx-14.0.1_osx-x64_bin-sdk.zip).
  3. Uncompress and install JavaFX:
unzip ~/Download/openjfx-14.0.1_osx-x64_bin-sdk.zip
mkdir -p /usr/local/lib/javafx-14
cp ~/Download/javafx-sdk-14.0.1/lib /usr/local/lib/javafx-14
ln -s /usr/local/lib/javafx-14 /usr/local/lib/javafx
  1. Add the following to .tcshrc (or other shell initialization file):
setenv JAVA_HOME `/usr/libexec/java_home`
setenv PATH_TO_FX /usr/local/lib/javafx

5. In IntelliJ, set a Path Variable for JavaFX:

IntelliJ IDEA -> Preferences -> Appearance & Behavior -> Path Variables
  1. Follow the directions in the JavaFX documentation to configure projects to use JavaFX: https://openjfx.io/openjfx-docs/#IDE-Intellij
  2. NOTE: you may need to add another VM-option if you are using JDK14 & JavaFX 14:
--add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED