JavaFX Application with Maven in Eclipse

前端 未结 5 1548
逝去的感伤
逝去的感伤 2021-01-02 01:41

I want to ask if there is any method to add JavaFX into Maven Archetype list in Eclipse or any plugin to use Maven to build JavaFX Application.

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 02:10

    The only thing I add to my pom.xml in order to build JavaFX Application is this dependency :

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

    It is simply fetching the javafx jar in my Java8 JRE to add it to the project. Then I use the maven-assembly-plugin to build the jar with dependencies.

    Hope it helps.

提交回复
热议问题