# Processing and JavaFX

**URL:** <https://discourse.processing.org/t/processing-and-javafx/45692>\
**Category:** Libraries\
**Created:** [February 1, 2025, 6:04pm UTC](https://discourse.processing.org/t/processing-and-javafx/45692 "2025-02-01T18:04:21Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [November 18, 2025, 6:51pm UTC](https://discourse.processing.org/t/processing-and-javafx/45692/16 "2025-11-18T18:51:19Z")

</div>

Hello folks!

I was able to make modifications to the `JavaBuild.java` and run the JavaFX sketches in this topic with the JavaFX library _as is_:

- without any modifications to the JavaFX library

- without adding any JavaFX jars to the sketch

This is where I modified:  
_[processing4/java/src/processing/mode/java/JavaBuild.java at main · processing/processing4 · GitHub](https://github.com/processing/processing4/blob/main/java/src/processing/mode/java/JavaBuild.java#L288)_

The modified Processing PDE ran the code successfully _but_ the editor gave false flags (_underlined in red)_ about the classes not existing and I was able to make modifications to these files to address this:

_[processing4/java/src/processing/mode/java/RuntimePathBuilder.java at main · processing/processing4 · GitHub](https://github.com/processing/processing4/blob/main/java/src/processing/mode/java/RuntimePathBuilder.java#L283)_

_[processing4/java/src/processing/mode/java/RuntimePathBuilder.java at main · processing/processing4 · GitHub](https://github.com/processing/processing4/blob/main/java/src/processing/mode/java/RuntimePathBuilder.java#L371)_

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

> **Debug output of modified Processing**
>
> ```auto
> 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 collaborative assistant in the process.  
_I will not be sharing the code generated for this._

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

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/9/e974861c70d18596f9c8543154496512a3dc3f2b.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/e/5ef7e4647c9b02ac6c3ae8b1cf2e09db7b30795f.png)

> [@svan](#):
>
> This topic needs to be revisited, because there appears to be a simpler way.

Processing 4.4.10 is not adding the JavaFX _modules_ to the class path.  
This can be examined with these in a sketch:  
`println(System.getProperty("java.class.path"));`  
`println(System.getProperty("java.library.path"));`

Output (with modified code to format):

> **Class Paths and Library Paths**
>
> ```auto
> [java.class.path](path.separator: ";"):
> - D:\temp\processing\Print_System_Data_1_0_212922241895653343933temp
> - 
> - E:\Processing\app\resources\core\library\annotations-13.0.jar
> - E:\Processing\app\resources\core\library\antlr-2.7.7.jar
> - E:\Processing\app\resources\core\library\core-4.4.10.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-android-aarch64.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-linux-aarch64.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-linux-amd64.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-linux-armv6hf.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-macosx-universal.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-2.5.0-natives-windows-amd64.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-2.5.0.jar
> - E:\Processing\app\resources\core\library\gluegen-rt-main-2.5.0.jar
> - E:\Processing\app\resources\core\library\jogl-all-2.5.0-natives-android-aarch64.jar
> - E:\Processing\app\resources\core\library\jogl-all-2.5.0-natives-linux-aarch64.jar
> - E:\Processing\app\resources\core\library\jogl-all-2.5.0-natives-linux-amd64.jar
> - E:\Processing\app\resources\core\library\jogl-all-2.5.0-natives-linux-armv6hf.jar
> - E:\Processing\app\resources\core\library\jogl-all-2.5.0-natives-macosx-universal.jar
> - E:\Processing\app\resources\core\library\jogl-all-2.5.0-natives-windows-amd64.jar
> - E:\Processing\app\resources\core\library\jogl-all-2.5.0.jar
> - E:\Processing\app\resources\core\library\jogl-all-main-2.5.0.jar
> - E:\Processing\app\resources\core\library\kotlin-stdlib-2.0.20.jar
> - E:\SketchbookFolder\libraries\video\library\gst1-java-core-1.4.0.jar
> - E:\SketchbookFolder\libraries\video\library\jna.jar
> - E:\SketchbookFolder\libraries\video\library\video.jar
> - E:\Processing\app\resources\modes\java\libraries\serial\library\jssc.jar
> - E:\Processing\app\resources\modes\java\libraries\serial\library\serial.jar
> - E:\SketchbookFolder\libraries\javafx\library\javafx.jar
> 
> [java.library.path](path.separator: ";"):
> - E:\SketchbookFolder\Print_System_Data_1_0_2\code
> - E:\Processing\app\resources\core\library
> - E:\SketchbookFolder\libraries\video\library\windows-amd64
> - E:\Processing\app\resources\modes\java\libraries\serial\library
> - E:\SketchbookFolder\libraries\javafx\library\windows-amd64
> - E:\Processing
> - C:\WINDOWS\system32
> - C:\WINDOWS
> - E:\Processing\app
> - .
> 
> ```

My exploration in this post is focused only on the _root cause_ of why JavaFX is not working as expected and experimenting with the code for personal development.  
There are already some issues related to this on GitHub and a search for JavaFX will find these.

In the mean time…

Several workarounds have been presented in this topic for those interested in exploring JavaFX.

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

Have fun!

`:)`

---

_[View the full topic](https://discourse.processing.org/t/processing-and-javafx/45692)._
