How can I add a JavaFX 2.0 class to an existing Maven project?

前端 未结 4 1886
星月不相逢
星月不相逢 2021-02-14 14:01

I have a Maven project that just displays a graph on the xy axis. I want to change that graph to a Javafx 2.0 linechart to display the same data. I tried using the FEST-javafx-m

4条回答
  •  你的背包
    2021-02-14 14:39

    Using JDK 1.7 you have to perform the following mvn goal.

      mvn com.zenjava:javafx-maven-plugin:2.0:fix-classpath   
    

    This command will change the classpath of your JRE and copy the jfxrt.jar to the JAVA_HOME\lib\ext directory.

    Take an additional look here for further information: JavaFX Maven Plugin

    Within your pom-file you have to add the following dependency configuration.

         
            javafx
            jfxrt
            2.2
            
            system
            ${java.home}/lib/ext/jfxrt.jar
        
    

提交回复
热议问题