javafx.application does not exist

Answered

I have a unique situation here. I am using the third party SDK 19.fx-librca. This SDK contains the javaFX jars. I am doing this because it makes it easier to create .dmg, .msi, .rpm packages. I only have one issue. I cannot launch my program from a run configuration.

It has been explained to me that I need to go to Preferences -> Tools -> Shared Indexes and set JDK's to don't download, because the intellij shared indexes don't include JavaFX for Java 19.

I then went to File -> Invalidate Caches, then checked all the checkboxes and then clicked the "invalidate and Restart" button.

This is not working for me as I am still getting all the "package javafx.* does not exist" errors. This does work fine when I use Eclipse, so I know it is an Intellij thing.  My question is if there is a work around for this?

Thanks

 

2 comments
Comment actions Permalink

Bit more detail here, including some attempts at workarounds.

This template can be used to generate a JavaFX app. Many users (myself included) ran into problems with the shared indexes not recognizing a JDK with a bundled JavaFX. I *think* that the issue may be that there is no discrimination between a JDK with JavaFX bundled and one w/o. So, if the user has a 1.17 JDK, the shared index that is downloaded does not include the JavaFX modules and then IntelliJ complains.

For most users, the workaround has been to disable downloading shared indexes and then Repair IDE.

In any event, it would be nice for the shared index feature to work with two JDKs that report the same version string but have different bundled jmods.

Liberica and Zulu both offer the same JDK but one with JavaFX and the other without. I suspect this will become more of an issue in the future - for example, it's easy to imagine a future JDK shipping w/o legacy features such as CORBA, etc.

0
Comment actions Permalink

Perry Lee Cameron I have all options in "Shared Indexes" always set to "Download automatically". I have no issues with running a JavaFX project with usual run config, using e.g. BellSofts's "full" jdk (11, 19). Please share more details about your project or, better, share a sample project which have this issue, thanks

0

Please sign in to leave a comment.