Plexus Compiler Component for javafxc (OpenJFX Compiler) / Updated 2009-07-28

What's New

JavaFX and JavaFX SDK were both released (current version of SDK is 1.2). The earlier version of the component (0.1) would not work with the final version of the products, so the component was changed to support final version of the compiler and SDK. Currently executing javafxc from command line results in complicated building a long chain of classpath elements and command line arguments and then calling Thus, in version 0.3 only forked execution of compiler is supported (in version 0.1 both were supported and forked execution was not recommended). Good news is that you need not to specify dependencies on parts of JavaFX runtime (runtime.jar, scenario.jar, etc.), the component simply invokes javafxc as if it were invoked manually from command line. If you use old version you will need to managed dependencies manually (putting them into the local repository and so on). That's we strongly recommend to use version 0.3. If by any reason you would like to use 0.1 the previous version of this page is here. The artifact is now in Maven Central Repository and, thus, you need not use SF-hosted repository. WARNING: Version 0.2 is defunct, however you may find it in Maven Central Repository.

Basic usage

You can build your JavaFX sources with Maven 2 using standard “maven-compiler-plugin”.

Put something similar in <build> section of POM file:

                  <fork>true</fork> <!-- NOTE: only “fork” mode supported now -->
                      <groupId>net.sf.m2-javafxc</groupId> <!-- NOTE: groupdId conforms project domain name, was: net.sf.m2-javafxc -->
                      <version>0.3</version> <!-- NOTE: 0.3 is the current version in Maven Central repository -->

Make sure you have $JFX_HOME environment variable set.

For Windows users: JavaFX SDK should not be installed into location which path contains spaces (or other tokens that need escaping), please, no C:\Program Files !


Sometimes it is hard to understand if the component fetches JavaFX SKD correctly or not... Use -X and -e option to understand what happens.

That is all

If you have any suggestions, ideas or want to contribute, mail list is: (archive Thank you!

Happy coding! :) Logo