Javafx project doesn't compile with maven

后端 未结 1 1699
别跟我提以往
别跟我提以往 2021-01-01 21:41

I have a Java FX project and am using maven 3.0.5 to build. When i run mvn package/install, the project fails and complains that the package javafx.* doesn\'t exist

1条回答
  •  天命终不由人
    2021-01-01 22:09

    placing this in the dependencies (depending on where your jdk is) will help the dependency compile, however you should probably replace it with a variable that the user can specify in their settings.xml or maven system properties:

        
            com.oracle
            javaFX
            2.2
            system
            C:\Program Files\Java\jre7\lib\jfxrt.jar
        
    

    see Maven project with JavaFX (with jar file in `lib`) for more details as to why

    0 讨论(0)
提交回复
热议问题