Skip to main content

Building OpenJDK and OpenJFX on Windows (September 2020)

The JDK has just moved to GitHub through project Skara. I am moving to a new laptop. So it is time to revisit building OpenJDK and OpenJFX (on Windows 10 64bits).

  1. Create a C:\dev\ directory 

  2. Download and install Cygwin
    select the following packages

    • autoconf

    • make

    • zip

    • unzip

  3. Download and install Git

    Either from Git for Windows or via Cygwin (the later may be more compatible with the build)

  4. Download the current OpenJDK and extract it to C:\dev\jdk-14.0.2

New Blog

Time for a new blog.
When I started, Blogger was fine.
However adding code/commands snippets is not built-in, and it lacks modifications history.
So I am now moving to a Hugo blog hosted at GitLab: https://blog.lhochet.dev

public class Main
{
  public static void main(String[] args)
  {
    System.out.println("Hello new blog!");
  }
}

I’ll leave the old blog as a backup, though I’ve migrated the old articles to the new blog for convenience and to see how Hugo handles real articles.

Hacking OpenJFX, Windows AppBar support

I like widget bars (if only because they tend to provide an analogue clock that I consult occasionally),
so over time I’ve used AB5k (Glossitope), WidgetFX, then Google Desktop, when the later was discontinued I thought I should do my own, so that it would only be discontinued when I’d stop maintaining it myself.
Eventually I started working on one using JavaFX.
Since I could not find a ‘proper’ way to have a side bar, I tried with this project to add some AppBar (doc and Petzold’s article on the subject) support to OpenJFX.
It currently supports adding a main window that is an AppBar on any of the 4 edges, resizing and transparency.

Buildling OpenJDK with Windows Subsystem for Linux

Thanks to Andrew Luo (and the JDK build team), it is now possible to build OpenJDK with Windows Subsystem for Linux on Windows 10 (1809+). This post will also use the JDK mirror at Github (if it is not synchronised, see the previous post for using Mercurial).

2019-01-19: added the Mercurial instructions

  1. Activate Windows Subsystem for Linux
    In an administrative Powershell:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

    Restart then install, say, Ubuntu from the Windows Store

Building OpenJDK and OpenJFX on Windows (Mid August 2018)

A lot has changed in the last year when it comes to building OpenJDK and OpenJFX on Windows (10 64bits) (single repository, integrated Freetype, VS2017)… and some more changes are expected with project Skara.

In the mean time here are some updated steps:

Update: 2018-08-18: VS2017 15.8 broke the OpenJFX build, updated the steps with an additional one to work around this issue.

  1. Create a C:\dev\ directory 

  2. Download and install 7-zip (if needed, to open .tar.gz and  .xz files)

Building OpenJDK 9 with OpenJFX 9 on Ubuntu (VBox and WSL)

Wanting to test Windows Subsystem for Linux, I’ve refreshed my steps for building on Ubuntu.
(Dependencies come from the helpful configure messages for the JDK and from the OpenJFX wiki)

Quick steps for installing WSL:

  1. Activate the developer’s mode in settings

  2. In an administrator PowerShell console run:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  3. Open Bash and install Ubuntu  (the following also applies to a VirtualBox VM)

To build OpenJFX and OpenJDK 9:

  1. Install the dependencies:

WorldClock and Jigsaw (the Java 9 edition)

Although I have other applications running as Jigsaw modules, I hadn’t migrated WorldClock to it. Now it is.

WorldClock is currently composed of a set of ‘modules’:

  • config
    that will read/write a configuration from/to disk

  • geonames4lhwc
    that will connect to the Geonames service and retrieve a list of cities for a search string

  • application
    the application

  • editor
    an editor for the configuration

  • panel
    the WorldClock panel that shows the day and night on Earth

Building OpenJDK 9 with OpenJFX 9 on Windows, the Jigsaw way

This post is a step by step to build the OpenJDK 9 with OpenJFX 9 with the Jigsaw changes on Windows (10 64bits).

It is based on the Jake instructions.

Update: 2017-01-21: OpenJFX has updated build requirements

  1. Create a C:\dev\ directory

  2. 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:

Building OpenJDK with OpenJFX Jigsaw prototype on Windows

This post is a step by step to build the OpenJDK with OpenJFX Jigsaw prototype on Windows (10 64bits).

For OpenJDK 9 and OpenJFX 9 see the adjusted page.

Update 2016-10-08: Mercurial URL changed

  1. Create a C:\dev\ directory

  2. 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

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