Reputation: 33
I am trying to run the "mavenproject1" file created by doing a "File::new project" and selecting "maven" then "JavaFX Application".
I am using the latest and greatest. I have Java JDK 1.7.0_45 which I installed separately that is configured to build the project. I have Netbeans 7.4 (Build 201310111528) with MAVEN 3 built in. JavaFX is bundled with the JDK 1.7.0_45.
I can make the project execute, but my source files get an error indicating that the JavaFX package does not exist. I added the following to my pom.xlm file which allows Maven to build and execute the source files even though the NB editor cannot find the JavaFX packages:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>2.0</version>
<scope>system</scope>
<systemPath>${java.home}\lib\jfxrt.jar</systemPath>
</dependency>
How can I get the NB editor to recognize the JavaFX packages?
Upvotes: 3
Views: 15451
Reputation: 159536
If you can, I advise using Java 8 as:
You may also want to consider using the javafx-maven-plugin.
Upvotes: 4