Welcome to OpenJFX
Welcome to OpenJFX. JavaFX is the next generation widget toolkit for the Java client. It is modern, efficient and full featured. OpenJFX is the open source version of the toolkit. OpenJFX is presently a subset of JavaFX, but over time, as more of JavaFX becomes open source, they will become the same.
Building and Running OpenJFX
JFX consists of a forest of mercurial repositories. These repositories contain NetBeans, Eclipse and IntelliJ projects with the Java source, native projects and the scripts needed to build JavaFX components. A JavaFX component is a large and obvious unit of functionality, such as the user interface controls or the embedded web browser.
As you can imagine, building a UI toolkit for many different platforms is quite complex. It requires platform specific tools such as C compilers as well as portable tools like ant. The build and project structure of JavaFX like most large projects has evolved over time and is constantly being revised.
Building OpenJFX requires that you have the binary porition of OpenJFX. You will need to be a member of OTN (Oracle Technical Network) in order to download the binary.
Working with OpenJFX and JavaFX
Over the course of time, various components, projects and build structures will be contributed to OpenJFX until all of JavaFX is open source. In the meantime, you will need to download the JavaFX binary that matches OpenJFX for your platform and place your compiled code first on the class path. First though, you will need to download and install the tools needed to build OpenJFX and place them on your the command line path for your operating system.
Here are the tools required to build OpenJFX:
- JDK1.6
- Ant 1.7.1
- Mercurial 1.8.2
- Cygwin (for Linux commands on Windows)
Here is the recipe for building OpenJFX (use a Cygwin shell on Windows):
- Download the latest JavaFX Developer Preview binary
- Unzip the binary and put it in ~/closed-jfx
- mkdir -p ~/open-jfx
- cd ~/open-jfx
- hg clone http://hg.openjdk.org/openjfx/2.1/master
- cd master
- mkdir -p artifacts/sdk/rt
- cp -r ~/closed-jfx/javafx-sdk2.1.0-beta/rt artifacts/sdk
- hg clone http://hg.openjdk.org/openjfx/2.1/master/rt
- cd rt
- Edit build-defs.xml (comment out '<propertycopy name="javac.debuglevel" from="${ant.project.name}.javac.debuglevel" silent="true" override="true"/>')
- cd javafx-ui-controls
- ant
Here is the command line needed to run OpenJFX:
- java -cp ".:/Users/someone/open-jfx/master/rt/javafx-ui-controls/dist/javafx-ui-controls.jar:/Users/someone/open-jfx/master/artifacts/sdk/rt/lib/jfxrt.jar" test.HelloButton