Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with JavaFX file in Intellij

I'm fairly new to using JavaFX and have been tinkering with it on my own in a few simple projects.

I have to collaborate with a few others for a main project, where I am seeing this conflicting issue:

enter image description here

I'm having an issue with the src.zip file of javafx. On my standalone projects, I do not encounter this issue. However, since working with others, this error has appeared. Prior to this, I was getting a Kotlin plugin issue, where I had to completely disable Kotlin.

Error:java: C:\Users\nolan\Javalibs\javafx-sdk-11.0.2\lib\src.zip

I'm unsure of what this issue might mean, so any help would be appreciated.

Thank you.

like image 373
datowlcs Avatar asked Dec 29 '25 05:12

datowlcs


1 Answers

I had the same problem too and discovered it was because I added the JavaFX 11 SDK to Intellij incorrectly. I initially had the added library point to just the directory /lib. Since this directory includes both the jars and src.zip, Intellij will try to run both and produce the error.

To solve this, when Intellij prompts you to "Select Library Files," you need to explicitly select the files within the /lib directory which will then be added as shown here. This will also allow proper inspection of the source code without Intellij having to decompile the class file when ctrl + left clicking a class name.

like image 123
Stephan Avatar answered Dec 31 '25 19:12

Stephan