(Processing 4.4.4 Windows 10)
I’m trying to use javafx with processing but i get this error.
The package “javafx” does not exist. You might be missing a library.
i have installed the javafx library.
//https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Button.html
import processing.javafx.*;
import javafx.scene.*;
import javafx.scene.control.*;
//import javafx.scene.control.Control;
//import javafx.scene.control.Labeled;
//import javafx.scene.control.ButtonBase;
//import javafx.scene.control.Button;
//import processing.javafx.scene.*;
//import processing.javafx.controls.*;
void setup(){
size(640, 480, FX2D);
background(209);
stroke(255);
Button button = new Button("Click Me");
}
void draw(){
}
There have been issues opened that “fixed” this problem. So not sure what the problem is here.
Thanks.
It now works like it’s supposed to on Mac; so far I have only found one of my old files that won’t run, for reasons I don’t understand. This is without drag 'n dropping jar files. In the beginning I had to modify the editor source code to include all seven modules in order to use JavaFX which is why I made the pull request to add all of them. I also have Linux and Windows 11 systems that I rarely use and have discovered that I’m unable to run the JavaFX multiplication table demo after instal…
It seems that this issue has not been resolved but drag’n dropping the jar files on the sketch window fixes the problem.
1 Like
svan
August 13, 2025, 4:17am
3
It’s only a problem for Windows; MacOS works like it’s supposed to. Don’t know about Linux. I’ll bet if you look inside your sketch folder after the drag 'n drop you’ll find a folder entitled ‘code’ with your drag 'n drop files inside, which is another way around the problem.