[ACCEPTED]-JavaFX with Maven-javafx

Accepted answer
Score: 12

Starting with Java 7u9 I think JavaFX is 20 shipped together with Java SE runtime and 19 the rest, so it makes it pretty easy to 18 create a Maven-based JavaFX project.

Here 17 is what you do (assuming you have latest 16 Java SE 7 runtime environment):

  1. Go to directory 15 where your JRE libs are installed: cd "/c/Program Files/Java/jre7/lib"

  2. Find 14 what is the version of the JavaFX by reading 13 the javafx.properties file. cat javafx.properties will produce something like: javafx.runtime.version=2.2.3

  3. Now 12 you are ready to install the JavaFX runtime 11 package to Maven: mvn install:install-file -Dfile=jfxrt.jar -DgroupId=com.oracle -DartifactId=javafx -Dpackaging=jar -Dversion=2.2.3

  4. Finally, create a simple 10 Maven project, in say NetBeans, open your 9 pom.xml file and add the following dependency:


Once 8 you save the pom.xml you can continue using 7 your typical Maven workflow.

Please note 6 I used the MSYS (http://www.mingw.org) environment on Windows 5 in the examples above in the case you get 4 confused. If you prefer Windows CMD it would 3 be very much similar. I just do not feel 2 comfortable without BASH and GNU tools such 1 as sed, grep, etc...

Score: 4

This helped me a lot:

Blog Entry

In the beginning of 4 the Blog Entry the author mentions another 3 great Article that can be found here...:

Another Blog

The 2 main "magic" is getting "settings.xml" right... Afterwards...it 1 is not that difficult.

Score: 3

I released a new version of the FEST JavaFX 3 Compiler Maven Plug-in. This new version 2 supports compilation of test sources. For 1 more details please visit http://alexruiz.developerblogs.com/?p=1197

Score: 3

There is a maven plugin developped by an 2 user of javafx.

See this mailling post :


and 1 the github site :


Score: 2

Alex Ruiz had a really good post on this 2 recently and released a Maven plugin that 1 should help you:


More Related questions