Blog

  • JavaFX Installation on Windows

    JavaFX is no longer included in the JDK so we have to manually add it.

    First install JDK 21.

    Then download JavaFX SDK.

    Download the HelloFX.java file from GitHub.

    Open Command Prompt not PowerShell! See the video below:

    Navigate to the folder you downloaded the HellowFX.java file using below command:

    cd C:\RAW\Code\Repos\

    Execute the below commands

    set PATH_TO_FX=C:\RAW\Code\javafx\lib"
    javac --module-path %PATH_TO_FX% --add-modules javafx.controls HelloFX.java

    Then try to run the application(HellowFX.class) file using below command:

    (notice the missing c in command javac …)

    java --module-path %PATH_TO_FX% --add-modules javafx.controls HelloFX

    Done!

    Voila!

    Also working fine using Maven on Intellij IDEA: