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

前端 未结 4 1866
星月不相逢
星月不相逢 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:47

    I had the same problem and here is my solution:

    If using Java 7u7 (javafx is integrated into jdk/jre):

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

    For previous versions of java:

        
            javafx
            javafx
            2.1
            system
            ${env.JAVAFX_HOME}\rt\lib\jfxrt.jar
        
    

    And you have to set system variable JAVAFX_HOME to home dir of JavaFx.

提交回复
热议问题