Skip to content

JavaFX no longer runs in Processing 4.4.1 #1052

Closed

Description

@vsquared

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.

Activity

  1. Stefterv commented on Apr 18, 2025

    @Stefterv
    Member

    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.

  2. vsquared commented on Apr 18, 2025

    @vsquared
    ContributorAuthor

    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.

  3. Stefterv commented on Apr 18, 2025

    @Stefterv
    Member

    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! 💙

  4. vsquared commented on Apr 19, 2025

    @vsquared
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions