Setting the JavaFX Home

In order for this plugin to work, it needs to know the path where JavaFX is installed in your system. We refer to this path as the JavaFX home.

Why do I need to specify a JavaFX home?

The JavaFX plugin does not expect the JavaFX jar files specified in the "dependencies" of a POM file for the following reasons:

  • Per JavaFX's license, only Sun/Oracle can distribute the JavaFX jars
  • Installing JavaFX jars in a local repository is easy, but time consuming: we can only install one at a time
  • So far, with each release, the number or names of the JavaFX jars changed

Using an environment variable

This is the easiest way to specify the path of the JavaFX home directory. The JavaFX plugin will automatically read this value and no further configuration is needed.

Specifying the "javafxHome" parameter in the "compile" goal

The following is a sample POM file that specifies the path of the JavaFX home directory in the configuration of the "compile" goal:

<build>
  <plugins>
    <plugin>
      <groupId>org.easytesting</groupId>
      <artifactId>javafxc-maven-plugin</artifactId>
      <version>1.0b1</version>
      ...
      <configuration>
        <javaFxHome>c:\JavaFX\javafx-sdk1.2</javaFxHome>
      </configuration>
    </plugin>
  </plugins>
</build>