{"id":497,"date":"2011-10-17T20:35:42","date_gmt":"2011-10-17T19:35:42","guid":{"rendered":"http:\/\/www.xenonique.co.uk\/blog\/?p=497"},"modified":"2011-10-21T10:43:30","modified_gmt":"2011-10-21T09:43:30","slug":"install-javafx-runtime-into-local-maven-repository","status":"publish","type":"post","link":"https:\/\/www.xenonique.co.uk\/blog\/2011\/10\/17\/install-javafx-runtime-into-local-maven-repository\/","title":{"rendered":"Install JavaFX Runtime Into Local Maven Repository"},"content":{"rendered":"<p>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.<\/p>\n<p>This is my MSDOS command script to do it:<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nREM Installing Oracle JavaFX 2.0 Runtime into a Local Maven Repository\r\nREM Based on the information from JFXtras 2.0 Project\r\nREM https:\/\/code.google.com\/p\/jfxtras\/wiki\/ContributorGettingStarted\r\nREM Peter Pilgrim 12th September 2011 in Crete\r\n\r\nREM set JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_27\r\nREM set javafx.home=C:\\Program Files\\Oracle\\JavaFX 2.0 SDK\r\nREM set JAVAFX_HOME=C:\\Program Files\\Oracle\\JavaFX 2.0 SDK\r\nREM set javafx.home=%JAVAFX_HOME%\r\nREM set USERPROFILE=C:\\Users\\Peter\r\n\r\nREM Install the JavaFX Java Library\r\ncall mvn install:install-file -Dfile=&quot;%javafx.home%\\rt\\lib\\jfxrt.jar&quot; -DgroupId=com.oracle -DartifactId=javafx-runtime -Dversion=2.0 -Dpackaging=jar\r\n\r\n\r\n\r\npushd &quot;%javafx.home%\\rt\\bin&quot;\r\ndel \/f \/q %USERPROFILE%\\Documents\\javafx-dll-temp-bin.jar\r\n&quot;%JAVA_HOME%\\bin\\jar&quot; -cf  %USERPROFILE%\\Documents\\javafx-dll-temp-bin.jar *.dll\r\npopd \r\n\r\nREM Install Native libraries\r\ncall mvn install:install-file -Dfile=%USERPROFILE%\\Documents\\javafx-dll-temp-bin.jar -DgroupId=com.oracle -DartifactId=javafx-runtime -Dversion=2.0 -Dpackaging=jar -Dclassifier=windows\r\n\r\nREM Copy the binaries to the Maven Local Repository\r\ncopy &quot;%javafx.home%\\rt\\bin&quot;  %USERPROFILE%\\.m2\\repository\\com\\oracle\\javafx-runtime\\bin\r\n\r\nREM End.\r\n<\/pre>\n<p>\nOnce you have the local repository set up, once include a Maven dependency into a project like this:\n<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n    &lt;dependencies&gt;\r\n        &lt;dependency&gt;\r\n            &lt;groupId&gt;com.oracle&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;javafx-runtime&lt;\/artifactId&gt;\r\n            &lt;version&gt;2.0&lt;\/version&gt;\r\n            &lt;scope&gt;provided&lt;\/scope&gt;\r\n        &lt;\/dependency&gt;\r\n        &lt;dependency&gt;\r\n            &lt;groupId&gt;junit&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;junit&lt;\/artifactId&gt;\r\n            &lt;version&gt;4.8.2&lt;\/version&gt;\r\n            &lt;scope&gt;test&lt;\/scope&gt;\r\n        &lt;\/dependency&gt;\r\n    &lt;\/dependencies&gt;\r\n<\/pre>\n<p>\nThus the group is <strong>com.oracle<\/strong>, the artifact id <strong>javafx-runtime<\/strong>, and the version is <strong>2.0<\/strong>.<\/p>\n<p>There you go.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: Once you have the local repository set up, once include a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[80,5,86,40,57],"tags":[],"_links":{"self":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/497"}],"collection":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=497"}],"version-history":[{"count":10,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/497\/revisions"}],"predecessor-version":[{"id":507,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/497\/revisions\/507"}],"wp:attachment":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}