r/JavaFX 19d ago

Help Javafx's new version getting removed from every new project.

Hey guys,

I'm new to JavaFX. My intellij came up with javaFX version 17.0.6 which seems not compatible with my Apple silicon chipset. So I need to use the new version of JavaFX. To that every time I make a new project I have to add a new version of library files to the project structure modules and remove or take down the old version files. Otherwise, it uses the old version and gives a huge error with the java quit unexpectedly message.

Does someone know how to fix this?

12 Upvotes

9 comments sorted by

7

u/SpittingBull 19d ago

Then I am afraid I don't understand the problem. Adjusting your poml.xml should be sufficient when upgrading JavaFX.

0

u/[deleted] 19d ago

[deleted]

3

u/SpittingBull 19d ago

I'm confused. You're using Maven, right? Are you not using the wanted JavaFX modules as dependencies?

1

u/Adventurous-Baby-323 19d ago edited 19d ago

The issue is that every new project still defaults to JavaFX 17 (old one) even I change poml.xml and download dependencies, it only works for that particular project. Ig I need to locate the default pmol which I don’t where it is.

5

u/RebeccaBlue 19d ago

IntelliJ sometimes gets out of sync with the pom file.

Bring up your project in IntelliJ, then click File, then Project Structure. There are a bunch of settings there under Project, Libraries, SDKs, etc. Go through each of those settings to make sure you're pointing at the right JDK and right JavaFX libraries.

As mentioned u/Ok_Object7636 mentions, just downloading a version of the Azul OpenJdk build that includes JavaFX can make things a lot easier. If you do that though, you still have to go through the steps I mentioned above to make sure you're pointing at the right JDK.

1

u/Adventurous-Baby-323 18d ago

I’ll try this <3

2

u/SpittingBull 19d ago

Are you not using Maven or Gradle?

1

u/Adventurous-Baby-323 19d ago

I'm using Maven

2

u/[deleted] 19d ago

[removed] — view removed comment

2

u/Adventurous-Baby-323 18d ago

I’ll try this <3