在pom中添加如下依赖:
<dependency> <groupId>com.oracle</groupId> <artifactId>javaFX</artifactId> <version>2.2</version> <scope>system</scope> <systemPath>C:Program FilesJavajre7libjfxrt.jar</systemPath> </dependency>
http://stackoverflow.com/questions/19015731/javafx-project-doesnt-compile-with-maven