Skip to content

JavaFX no longer runs in Processing 4.4.1 #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vsquared opened this issue Apr 18, 2025 · 4 comments · Fixed by #1054
Closed

JavaFX no longer runs in Processing 4.4.1 #1052

vsquared opened this issue Apr 18, 2025 · 4 comments · Fixed by #1054
Labels
bug Something isn't working

Comments

@vsquared
Copy link
Contributor

Most appropriate sub-area of Processing 4?

PDE

Processing version

4.4.1

Operating system

MacOS

Steps to reproduce this

"1. Try to run the following demo:

3."

snippet

import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;

void setup() {
  size(1, 1, FX2D);
  Stage stage = new Stage();
  stage.setTitle("Creating buttons");
  Button btn = new Button("button");
  btn.setLayoutX(70);
  btn.setLayoutY(80);
  Pane pane = new Pane();
  pane.getChildren().add(btn);
  Scene scene = new Scene(pane, 200, 200);
  stage.setScene(scene);
  stage.show();
}

Additional context

No response

Would you like to work on the issue?

Assign to someone.

@vsquared vsquared added the bug Something isn't working label Apr 18, 2025
@Stefterv
Copy link
Collaborator

Hey @vsquared! Yes, @SableRaf and I saw this recently as well and as far as I understand is limited to arm based Macs. We traced the issue to the accidental upgrade from JDK 17.0.8 to JDK 17.0.14. This will also be fixed by either upgrading the JDK past version 17 or with this approach which should undo the accidental upgrade.

@vsquared
Copy link
Contributor Author

Thank you and SableRaf for all of your work on the Processing editor; I like version 4.4.1 otherwise; it has a nice solid feel. I checked my java --version in Terminal and have the following on my macos silicon system (M2):

Image

You may mean to upgrade Processing's JDK? I think I remember reading that it has its own JDK? I have to plead ignorance on how to implement either option 1 or option 2. Another option is just to wait on your next version since you are now putting them out more frequently. I have an older version on my system that I modified and re-compiled to run JavaFX that I can use in the meantime.

@Stefterv
Copy link
Collaborator

Ah yeah sorry I shared some paths for me to take going forward to solve this issue. I think right now there is not anything you can fix for 4.4.1 to make it work on a Mac. Now that I think about it, you could try downloading the 17.0.8 jdk from here or here and replacing the contents of Processing.app/Contents/app/resources/jdk-17.0.14+7/ with the contents of the downloaded version.
I'll try and see if I can pull the fix in my runner branch forward to 4.4.3 so you'd have a working version next month.

Thank you for the nice words! 💙

@vsquared
Copy link
Contributor Author

vsquared commented Apr 19, 2025

First link didn't work and second link seemed to go to wrong version (I could have missed it), so I downloaded jdk-17.0.8 from here: https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html and then made the substitution in the app bundle and it worked! I can now run JavaFX with Processing 4.4.1. Thank you so much for taking the time to explain how to fix it. I was afraid the Apple gatekeeper would catch me, but he didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants