Platinum Partner
java,tools & methods

Install JavaFX Runtime Into Local Maven Repository

In order to get JavaFX 2.0 to work with a Maven Repository, requires some fudge factor. Because one cannot simply redistribute JavaFX Library, you have to install the libraries manually into a local Maven repository.

This is my MSDOS command script to do it:

REM Installing Oracle JavaFX 2.0 Runtime into a Local Maven Repository
REM Based on the information from JFXtras 2.0 Project
REM Peter Pilgrim 12th September 2011 in Crete
REM set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27
REM set javafx.home=C:\Program Files\Oracle\JavaFX 2.0 SDK
REM set JAVAFX_HOME=C:\Program Files\Oracle\JavaFX 2.0 SDK
REM set javafx.home=%JAVAFX_HOME%
REM set USERPROFILE=C:\Users\Peter
REM Install the JavaFX Java Library
call mvn install:install-file -Dfile="%javafx.home%\rt\lib\jfxrt.jar" -DartifactId=javafx-runtime -Dversion=2.0 -Dpackaging=jar
pushd "%javafx.home%\rt\bin"
del /f /q %USERPROFILE%\Documents\javafx-dll-temp-bin.jar
"%JAVA_HOME%\bin\jar" -cf  %USERPROFILE%\Documents\javafx-dll-temp-bin.jar *.dll
REM Install Native libraries
call mvn install:install-file -Dfile=%USERPROFILE%\Documents\javafx-dll-temp-bin.jar -DartifactId=javafx-runtime -Dversion=2.0 -Dpackaging=jar -Dclassifier=windows
REM Copy the binaries to the Maven Local Repository
call copy "%javafx.home%\rt\bin"  C:\Users\Peter\.m2\repository\com\oracle\javafx-runtime\bin
REM End.

Once you have the local repository set up, once include a Maven dependency into a project like this:


Thus the group is, the artifact id javafx-runtime, and the version is 2.0.

There you go.



{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ }}
{{ parent.authors[0].realName ||}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks