Set environment variable JAVA_HOME to your JDK installation, e.g. /usr/lib/jdk-14
Start IntelliJ Idea and create a new JavaFX project
Once created, navigate to File -> Project Structure -> Libraries and add the JavaFX library, pointing at the lib folder inside it, e.g. /home/user/Downloads/javafx-sdk-14
Navigate to File -> Settings -> Appearance and Behavior -> Path Variables and add a new path variable. Name it PATH_TO_FX and set the value to the lib-folder inside your JavaFX library.
Navigate to Run -> Edit Configurations… In the field VM options, paste this
Initially, I was struggling to get IntelliJ to recognize the JavaFX packages, that is because I stored the JavaFX library in a location with limit access rights, so IntelliJ couldn’t read it properly. If everything works fine, after you added the library, you will not be asked to chose a category. Instead, you will see this right away: