Processing and JavaFX

Hello @svan,

I was able to make modifications to the JavaBuild.java and run the JavaFX sketches in this topic with the JavaFX library as is out of the box (no copying or adding jars):

The modified Processing PDE ran the code successfully but the editor gave false flags about the classes not existing.

I also inserted print statements in that file to provide debug information:

Debug output of modified Processing
classpath_0: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.base.jar
classpath_0: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.controls.jar
classpath_0: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.fxml.jar
classpath_0: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.graphics.jar
classpath_0: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.media.jar
classpath_0: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.swing.jar
classpath_0: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.web.jar
DEBUG: Successfully added 7 JavaFX module paths.
classpath_1: ;D:\Users\GLV\Documents\Processing\libraries\javafx\library\javafx.jar
javaLibraryPath: ;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64

classPath: D:\temp\processing\JavaFX_Controls_Preview_New7169551845653962132temp;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\annotations-13.0.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\antlr-2.7.7.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\core-sources.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\core.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-android-aarch64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-linux-aarch64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-linux-amd64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-linux-armv6hf.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-macosx-universal.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-windows-amd64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-2.5.0.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\gluegen-rt-main-2.5.0.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-2.5.0-natives-android-aarch64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-2.5.0-natives-linux-aarch64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-2.5.0-natives-linux-amd64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-2.5.0-natives-linux-armv6hf.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-2.5.0-natives-macosx-universal.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-2.5.0-natives-windows-amd64.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-2.5.0.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\jogl-all-main-2.5.0.jar;F:\test2\processing4\app\build\compose\binaries\main\app\Processing\app\resources\core\library\kotlin-stdlib-2.0.20.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.base.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.controls.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.fxml.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.graphics.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.media.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.swing.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\windows-amd64\modules\javafx.web.jar;D:\Users\GLV\Documents\Processing\libraries\javafx\library\javafx.jar
WARNING: Custom port 0 is invalid. Falling back to random selection.
Debug Port Selected: 8257

Google Gemini was my assistant in the process.
I did all the work it seems!

Conclusions (Goggle Gemini assisted) from examining the Class Paths from original and modified Processing:

I would focus on the root cause of this and address that.
This “simple way” is a workaround to add to the list of others presented.

I had fun exploring this and encourage others to do the same!

Code shared on a related GitHub issue.

Have fun!

:)