Reputation: 31
I'm currently doing a project with javafx using maven. When I run it direcly from the run button of IntelliJ it works fine, but when I try to compile it with Maven I get a lot of errors like this one:
package javafx.collections does not exist
I have the javafx dependency like this on my pom.xml, but it looks like Maven isn't getting it.
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx</artifactId>
<version>11</version>
<type>pom</type>
</dependency>
</dependencies>
What am I missing? Thank you in advance
Upvotes: 0
Views: 325
Reputation: 5853
A POM dependency doesn't pull in the actual code. JavaFX was included in older versions of Java, maybe your IntelliJ IDEA setup uses an old version that already contains JavaFX.
Upvotes: 2