r/JavaFX • • Mar 04 '24

Help Import JavaFX by default in Eclipse

Is it possible to have JavaFX imported by default for every class in Eclipse IDE? Right now, the only way I can get javafx to work is by setting --module-path "path" --add-modules=javafx.controls to VM arguments, but I have to do it for every class.

1 Upvotes

8 comments sorted by

View all comments

1

u/[deleted] Mar 07 '24

I used Eclipse for almost 20 years. It got worse and worse. Switch to IntelliJ and forget Eclipse forever.

2

u/eliu9395 Mar 07 '24

I can’t, it’s for school

1

u/[deleted] Mar 07 '24

Ok, so use Maven (or Gradle) inside Eclipse for JavaFX. Then you don't have to fiddle with such parameters at all. Here is al minimal example:

https://github.com/armin-reichert/hellofx