eclipse-jdt / eclipse.jdt.debug

Eclipse Public License 2.0
16 stars 46 forks source link

Uncheck "Use -XStartOnFirstThread ..." for Java Applications by default on MacOS #90

Closed RedNova25 closed 1 year ago

RedNova25 commented 2 years ago

Summary

I am running Eclipse IDE for Java Developers Version: 2022-06 (4.24.0). My machine is an Intel MacBook Air with macOS Monterey 12.4. I use Java SE JDK 17.0.3.1 and JavaFX SDK 18.0.1.

When I create classes that use JavaFX, I create a run configuration for each class that extends Application. I create a new Run Configuration from "Java Application", then I go to the "Arguments" tab and uncheck "Use the -XStartOnFirstThread argument when launching with SWT". Only then will my JavaFX GUIs display. This is a long-known necessity for using JavaFX with Eclipse that I learned from a Medium article.

I would like if there was a way to have this option unchecked by default. If so, I may not need to create a new run configuration for each subclass of Application.

This is my first time reporting a bug and I already put it in the wrong place earlier. Please let me know if this should be posted in a different eclipse.jdt repository.

Steps to Reproduce

  1. Create a class with the import "javafx.application.Application" that extends Application.
  2. Create a main method in the class that uses the method "launch(args)" to start the application.
  3. Click the down arrow next to the Run button.
  4. Click on "Run Configurations..."
  5. Double click on "Java Application" to create a new run configuration.
  6. Go to the "Arguments" tab.
  7. See that under "VM Arguments", "Use the -XStartOnFirstThread argument when launching with SWT" is automatically checked.
ktatavarthi commented 2 years ago

Moving to jdt.debug as this is part of launching code handled in debug repository.

SarikaSinha commented 2 years ago

You can use "Prototypes" in Run Configuration. And when we create an instance of them you will get the values inherited from the prototyped Run Configuration.

SarikaSinha commented 1 year ago

Closing this as there is a work around.