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
Create a C:\dev directory
Download and install JDK 9 b109
Delete C:\Program Files\Java\jdk-9\lib\jfxrt.jar as otherwise the build won’t succeed
Download Gradle 2.11 and extract it into C:\dev
Download and install Visual Studio 2013 Community
Download (it may be faster to download the ISO)
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
Download and install Babun
Download and install Mercurial
In C:\dev open a standard console
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)
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
Build:
Still in the console:cd jfx
gradleBuild the JDK (see the full instructions)
In the console that built OpenJFX:
set JIGSAW_HOME=C:\dev\jdk9\build\windows-x86_64-normal-server-release\images\jdk
gradle appsthen
%JIGSAW_HOME%\bin\java -jar C:\dev\jfx-jake\apps\samples\Ensemble8\dist\Ensemble8.jar
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++ )