2

So, when I try to run my JavaFX Code sample on my M1 MBA I get this long error. https://pastebin.com/3EBekwVF

I am using macOS aarch64 javafx sdk from https://gluonhq.com/products/javafx/

I added the SDK to the Java Build Path via right clicking on the project -> selecting Java Build Path -> switching to Library tab -> add all .jars and src.zip with "Add External Jars" Then I went into my run configurations and added this line to my vm arguments

--module-path /Users/lockna/eclipse-workspace/javafx-sdk-18/lib --add-modules javafx.controls,javafx.fxml

I tried some fixes I found on reddit or other stack overflow posts, but they didn't work for me.

Any other fix I could try or something I could do?

1
  • Can you add to your main method, before the launch call: System.setProperty(“prism.verbose”, “true”);, run again and post the output? Commented Sep 19, 2021 at 20:29

1 Answer 1

3

Fixed it with setting the used JRE to the latest openjdk installed with brew. Then I had to uncheck the Use the -XstartOnFirstThread argument when launching with SWT box in Run configurations in the VM tab, then it worked

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, I'm new to Java, having same issue. How did you fix it exactly? What command did you run to set the JRE to the openjdk? Thanks
@irina Hi! I went to Eclipse -> Preferences -> Clicked on the Java tab on the left side -> Installed JREs Then I added a new one with this path /opt/homebrew/Cellar/openjdk/17/libexec/openjdk.jdk/Contents/Home I installed the JDK with brew install openjdk

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.