Skip to main content

Building OpenJFX 9 on Windows with Visual Studio 2013 Community

This post is a step by step to build OpenJFX 9 on Windows (10 64bits).

It is a refresh of the “Building OpenJFX on Windows” for the 9 sources and with Visual Studio 2013 (Community here) which is now used by Oracle.

Last updated: 2016-10-08, Mercurial URL change

  1. Create a C:\dev directory

  2. Download and install JDK 9 b109

  3. Delete C:\Program Files\Java\jdk-9\lib\jfxrt.jar as otherwise the build won’t succeed

  4. Download Gradle 2.11 and extract it into C:\dev

  5. Download and install Visual Studio 2013 Community

    1. Download (it may be faster to download the ISO)

    2. Install

      • uncheck all the options

      • or download AdminDeployment.xml to C:\dev\temp then start the installation with:

        vs_community.exe /AdminFile C:\dev\temp\AdminDeployment.xml

  6. Download and install Babun

  7. Download and install Mercurial

  8. In C:\dev open a standard console

  9. Get the sources:

    In the console copy:

    hg clone http://hg.openjdk.java.net/openjfx/9/rt/`` jfx

    (or hg clone http://hg.openjdk.java.net/openjfx/9-dev/rt/ jfx which is slighly ahead)

  10. Set up some environment variables:
    Still in the console:

    set GRADLE_HOME=C:\dev\gradle-2.11 set JAVA_HOME=C:\Program Files\Java\jdk-9 set PATH=%PATH%;%JAVA_HOME%\bin;%GRADLE_HOME%\bin;%USERPROFILE%\.babun\cygwin\bin

  11. Build:
    Still in the console:

    cd jfx
    gradle

  12. Build the JDK (see the full instructions)

  13. In the console that built OpenJFX:

    set JIGSAW_HOME=C:\dev\jdk9\build\windows-x86_64-normal-server-release\images\jdk
    gradle apps

    then

    %JIGSAW_HOME%\bin\java -jar C:\dev\jfx-jake\apps\samples\Ensemble8\dist\Ensemble8.jar

  14. Hack…

Using Babun seems to take care of the Cygwin packages that are needed by OpenJFX, those that may not be already installed may be added using:

pact install  <package name>

(an exception being g++: mingw64-x86_64-gcc-g++ )