Sunday, July 1, 2012

Bookmark and Share

While thinking about how to take advantage of Bean Validation within JavaFX 2 based applications, I just learned that JavaFX is actually part of the JDK installation since Java SE 7 Update 2. The latest JDK (Update 5) comes with JavaFX 2.1.1.

This makes it very easy to use the JavaFX API within Maven based applications; all what's required is to add the following dependency to your POM file:

1
2
3
4
5
6
7
<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>javafx-runtime</artifactId>
    <scope>system</scope>
    <version>2.1.1</version>
    <systemPath>${java.home}/../jre/lib/jfxrt.jar</systemPath>
</dependency>

That was simple :)

Now to the bad news: as it seems the installation doesn't contain the JavaFX API sources or JavaDocs. But that's not really a problem, as a ZIP with the sources can be downloaded from OpenJFX's Mercurial server and the latest Javadocs can be found here.