Eclipse OpenJ9 support

Eclipse OpenJ9 has been open source for a couple years now, and has builds for all the platforms TravisCI supports. We (JRuby project) would like to start running CI against OpenJ9.

There are at least two issues on GitHub that were closed without actually resolving the lack of IBM/OpenJ9:

It looks like preliminary support was added to the “edge” group, but never landed on the standard images.

Binary builds of OpenJ9 are available at https://adoptopenjdk.net/

1 Like

Using install-jdk.sh in raw mode might help here for the time being. Just pass a URL pointing to a .tar.gz compressed JDK binary via its --url option: https://github.com/sormuras/bach#install-jdksh

At the moment, my OpenJ9 sample job is broken due to moving to Adopt’s API version 2. But if you pass the raw/fixed download URL it should work out of the box.

See https://github.com/sormuras/sormuras.github.io/blob/master/.travis.yml#L30 and https://github.com/sormuras/sormuras.github.io/issues/4 for details.

install-jdk.sh raw mode?

Sample .travis.yml could look like this:

language: java

before_script:
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh

script:
- source install-jdk.sh --url https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.2%2B9_openj9-0.12.1/OpenJDK11U-jdk_x64_linux_openj9_11.0.2_9_openj9-0.12.1_openj9-0.12.1.tar.gz

after_script:
- java -version

Works as expected.

https://travis-ci.org/sormuras/sormuras.github.io/jobs/493200888 reports:

 openjdk version "11.0.2" 2019-01-15
 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9)
 Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.12.1, JRE 11 Linux amd64-64-Bit Compressed References 20190204_127 (JIT enabled, AOT enabled)
 OpenJ9   - 90dd8cb40
 OMR      - d2f4534b
 JCL      - 289c70b6844 based on jdk-11.0.2+9)
1 Like

Thanks! This appears to be working so far in some test builds of JRuby.

What’s the plan going forward to get OpenJ9 into the image by default? It is now one of only two certified open-source Java implementations (Hotspot being the other), and there’s a lot of interest in running and testing on it these days.

This would be the domain of GitHub - travis-ci/packer-templates: Templates for Packer! (and GitHub - travis-ci/travis-cookbooks: Chef cookbook monolithic repo 💣).

FYI, it also works smoothly with Amazon’s Corretto 11 … as long as they provide the raw .tar.gz archive.

https://travis-ci.org/sormuras/sormuras.github.io/jobs/493629785

openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment Corretto-11.0.2.9.1 (build 11.0.2+9)
OpenJDK 64-Bit Server VM Corretto-11.0.2.9.1 (build 11.0.2+9, mixed mode)
1 Like

Are you saying I should open issues there for OpenJ9 support?

Are you testing Corretto just for completeness, or is there something in there we’d expect to be different from OpenJDK builds?

IIRC, they tuned/hardened the implementation to their needs, but it should work as a drop-in replacement for OpenJDK. Amazon also stated their intention to push those changes upstream … some day.