How to launch JAR files with JDK21 and JavaFX

  1. Download the FujiGoban jar file from the PC page and place it on your desktop.
  2. If JDK is not installed yet, download the "Compressed Archive" (zip) for your OS from Oracle Java Downloads and extract the file.
  3. Create a folder named "Java" in the C drive, and move the extracted jdk-21.0.10 folder into it. C:\Java\jdk-21.0.10
  4. Open the JavaFX page, select "21.0.10" in "JavaFX Version" under "Download", and download the SDK.
  5. Extract the downloaded Zip file and move that folder to the C:\Java folder. C:\Java\javafx-sdk-21.0.10
  6. Download the launch script and place it on your desktop. Double-clicking this file will launch FujiGoban.
    Windows
    startFujiGoban.bat
    Mac
    startFujiGoban.command
    Linux
    startFujiGoban.sh
    For Mac/Linux, you need to give execution permission to the file first.

    chmod +x filename.command
    sh filename.command

    Operation has only been confirmed on Windows 11 and Ubuntu 22.04. Mac and Chrome OS are unconfirmed. Sorry if it doesn't work in other environments 🙇

* If the JDK/JavaFX version or save location is different, please edit the launch script according to your environment.

set JAVA_HOME="C:\Java\jdk-21.0.10"
set PATH_TO_FX="C:\Java\javafx-sdk-21.0.10\lib"
set PATH="%JAVA_HOME%\bin;%PATH%"

java --module-path %PATH_TO_FX% ^
--add-modules=javafx.controls,javafx.fxml,javafx.media,javafx.swing ^
-jar FujiGoban2.jar

◂ Return to PC page