Make a Docker Image for Future OpenJFX 8 Build

Here is the Dockerfile.

Then type in the following commands

The whole image is about 2.2GB and pushing takes some time to finish. When it’s done, everyone can get it from the docker hub.

Build OpenJFX 8 in CentOS 6.7 Docker Container

OpenJDK 8 doesn’t include OpenJFX by default. And to make OpenJFX work on old Linux distribution, such as CentOS 6.7, you can not simply follow the official instructions. This article will talk about how to build OpenJFX 8 in CentOS 6.7 docker container.

Start docker container

With docker, it’s extremely easy to get CentOS 6.7 environment.

Instructions

Yum Install Packages


Install GCC/G++ 6, Python 2.7, Ruby 2.4

Reference is https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/.


Install Gradle, CMake, Ant

Install gradle 4.8 and ant 1.10, update $PATH.


Sync OpenJFX 8 source code

Build without Webkit

Skip the samples and scene-builder build – “vim rt/build.gradle” and comment on the following lines

Start Gradle build.


when the build is done, the javafxsdk-overlay.zip will be generated.


Build with Webkit

With WebKit, the compilation will become extremely slow.

Before doing the steps of “Build without Webkit”, do the following extra steps.

Copy the gradle.properties from the template and enable the Webkit compiling

Enable “COMPILE_WEBKIT“, “BUILD_JAVADOC“, “BUILD_SRC_ZIP“, And specify COMPILE_TARGETS as “linux”

Update buildSrc/linux.gradle a little bit.


Update the symbolic link of /usr/bin/python2

Do the steps of “Build without Webkit“.