The OpenJFX compiler is a pure Java application built using open source tools. This page describes how to build it on your system.
- The 1.7.0 version of Apache Ant. To verify you have the correct version, run "ant -version" from a command-line shell; you should see a string starting with "Apache Ant version 1.7.0".
- A recent version of the Subversion version control system.
Building from the Command-Line
- Increase the maximum memory Ant uses: set the ANT_OPTS environment variable to "-Xmx256m" or more. This variable can be stored as a shell or system environment variable, or can be stored in %HOME%\antrc_pre.bat (Windows) or ~/.antrc (for more details, see Running Ant).
- Download the project source: as described on the project page's Subversion link, run the following command, substituting your java.net login. If you are prompted for a password, use your java.net login password.
svn checkout https://openjfx-compiler.dev.java.net/svn/openjfx-compiler/trunk openjfx-compiler --username your-login
- Change to the newly-created project top-level directory:
- List the project's build targets (this and the following commands are all run in the project's top-level directory):
- Build and test the project:
The first time a build is run, the external tools necessary to build the compiler are copied from the Internet to its tools/ directory (these tools are all open-source and freely available). When the build finishes successfully, the project distribution is now in the dist/ directory.
- To restore the project to its unbuilt state, run:
- To update the project source, run:
Building Using the NetBeans IDE
In Netbeans 6.0, go the menu "Versioning", then "Subversion", and "Check Out".
Enter the Repository URL:
Enter your java.net username and password. Hit next.
For Repository Folder(s), put:
Then click Finish.
Open the JavaFX Compiler and JavaFX Runtime projects (ignore the reference problems warning). To build, right-click on the Java FX Compiler project and select "Build"; then do the same for the Java FX Runtime. Then right-click each project again, and choose "Resolve Reference Problems". The unresolved reference jar files are either in the tools/ or the dist/lib/ directories.
Choose the menu "Versioning", then "Update" to update your svn files.
Frequently Asked Questions
1. When I launch any command with ant for the OpenJFX compiler, I get the following error message: "No supported regular expression matcher found: java.lang.ClassNotFoundException: org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher"
You need to have the Ant "optional" libraries installed. If running Linux with Apt, the package is called ant-optional. It appears that in the Apt repositories, the bare-bones Ant distribution (called ant) is separate from the optional distribution. Check with your package manager as to whether ant-optional is installed. An alternative is to install the distribution from the Apache Ant site, which appears to contain the optional Jars. (reported from system running Ubuntu Gutsy with Ant 1.7 installed)
Back to OpenJFX Compiler