We are exploring making this easier, by enabling a developer to build a set of javafx.* modules that can be used with a clean OpenJDK build (without the javafx.* modules). Stay tuned. (completed?)
You will likely need to set the following env variables to point to your VS 2017 installation, since Microsoft no longer sets such variables. This presumes that:
- You installed JDK 11 13 in
- You installed the Community edition of Visual Studio 2017 in
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community. If this isn't set correctly, you might see an error during the build saying that
- The folder name under
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVCis
14.11.25503. If this isn't set correctly, you might see an error during the
:graphics:compileDecoraNativeShadersWinbuild task saying that
cl.exeis missing. If you update VS, the folder name might change and you'll have to reconfigure the variable.
export VS150COMNTOOLS="C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build" export JAVA_HOME="C:/Program Files/Java/jdk-1113" export MSVC_VER=14.11.25503
Setting up a Linux build configuration is fairly straightforward. These build instructions were used for Ubuntu 1618.04.
First, run the following command to install all the required development packages:
TODO: verify and update this (I think many are unused)
sudo apt-get update sudo apt-get install ksh libasound2libavformat-devffmpeg57 libgl1-mesa-dev \ libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libjpeg-dev \ libpng-dev libx11-dev libxml2-dev libxslt1-dev libxt-dev \ libxxf86vm-dev pkg-config x11proto-core-dev \mercurial x11proto-xf86vidmode-dev libavcodec-dev mercurial git \
libgtk2.0-dev libgtk-3-dev \ libxtst-dev libudev-dev libavformat-dev
If you build WebKit (it is not built by default) you will need the following additional tools:
- Cmake 3.813.2 3 or later, available from the Cmake download site
We use Oracle Linux 7 to build the javafx.* modules that we ship with the Oracle JDK releases. Here are the packages you will need:
TODO: verify and update this
yum install mercurial git bison flex gperf ksh pkgconfig \
libpng12-devel libjpeg-devel libxml2-devel \
libxslt-devel systemd-devel glib2-devel gtk2-devel \
libXtstgtk3-devel pango-devel freetype-devel
OpenJFX, as with OpenJDK, uses Mercurial as the source control system. You must install some support for using Mercurial. Many (if not all) IDEs include built in support, although the tooling is generally not as good as you might get from a standalone tool.
The javafxports/openjdk-jfx mirror on GitHub is used a development sandbox, so we encourage developrers to become familiar with Git. We are in the process of transitioning to Git as part of Project Skara. The OpenJFX repo is: https://github.com/openjdk/jfx. That is currently a read-only mirror, but we will likely transition to it in the not-too-distant future.
Gradle is the primary build tool for building OpenJFX. Since the repository includes a Gradle wrapper that will download the correct Gradle version when needed, you do not need to manually install Gradle. We currently use Gradle 45.83 for jfx-dev (IMPORTANT: Only this version is regularly tested). If you want to generate a wrapper yourself (for example, you want to build OpenJFX with a different Gradle version), then you will need to install Gradle.
gradle command used throughout this document can be replaced with
./gradlew when using the wrapper.
Note: gradle is available as a Ubuntu packagean Ubuntu package, but check the version. This command should work after you set JAVA_HOME:
You will need Apache Ant 1.810.25 to build the OpenJFX apps (IMPORTANT: there are known issues with later versions of antant 1.9.x, so get exactly use either version 1.10.5 or 1.8.2).
JDK_HOMEto point to the root of your jdk-N release.
Note: on windows, the JAVA_HOME and JDK_HOME variables must be in DOS format (e.g., "C:/Program Files/..." rather than "/cygdrive/c/Program Files/..."), although you can use forward slashes ('/'). Test your settings with:
# for the active development stream, currently targeted for JDK 1213 hg clone http://hg.openjdk.java.net/openjfx/jfx-dev/rt