DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Java
  4. Install JavaFX Runtime Into Local Maven Repository

Install JavaFX Runtime Into Local Maven Repository

Peter Pilgrim user avatar by
Peter Pilgrim
CORE ·
Oct. 19, 11 · Interview
Like (0)
Save
Tweet
Share
10.38K Views

Join the DZone community and get the full member experience.

Join For Free

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 http://code.google.com/p/jfxtras/wiki/ContributorGettingStarted
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" -DgroupId=com.oracle -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
popd
 
REM Install Native libraries
call 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
 
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:

<dependencies>
    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>javafx-runtime</artifactId>
        <version>2.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
        <scope>test</scope>
    </dependency>
</dependencies>

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

There you go.

 

From http://www.xenonique.co.uk/blog/?p=497

Apache Maven Repository (version control) JavaFX

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • DevOps vs Agile: Which Approach Will Win the Battle for Efficiency?
  • A Guide to Understanding XDR Security Systems
  • Practical Example of Using CSS Layer
  • A First Look at Neon

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: