Skip to main content
Jump to: navigation, search

Java 9 Readiness

Revision as of 07:56, 14 March 2017 by (Talk | contribs)

Test. This wiki page explains how projects can check whether they are ready for Java 9 and documents the state for each release train project. The page also lists the projects that will provide new support for Java 9, e.g. Eclipse JDT. Those projects are expected to contribute to what we will offer once Java 9 goes GA. Note that at this point, the Planning Council did not yet decide how to do that.

The biggest feature in Java 9 is the Java Platform Module System, a.k.a. Jigsaw. With this, access to internal code of the Java runtime will no longer work. The Planning Council requests every release train project to check whether they use internal code from the Java runtime, or whether they use a library (most likely from Orbit), that does so.

There are several things you can do to check the readiness for Java 9.

Run and test your project with Java 9

To do this you need to download a Java 9 VM, e.g. from Since the Eclipse SDK uses types that aren't in the java.base module, you need to add the following vmargs to the eclipse.ini:

This step will no longer be necessary with 4.7 M7 and newer, as the launcher will add this by default (bug 493761). Your project might fail to run because you use types that are neither in java.base or, e.g. types from javafx.base. In that case you have to figure out which module(s) you need to add with --add-modules. You can do this if you run Eclipse with Java 9 Support (BETA) for Oxygen (see below) and then just open the type and perform Show In > Package Explorer. The Package Explorer will show the module in which that type resides.

Run your tests with Java 9

You can do this locally or on Hudson. A Java 9 VM is installed on Hudson (bug 469515). To launch tests or self-hosted applications locally from your IDE with a Java 9 JRE, you need to install the Java 9 BETA support to configure an Installed JRE that points at a Java 9 JRE or JDK.

Check whether your project or required libraries use internals of the Java VM

Since Java 8 there is a tool that allows you to check whether you use internals of the Java VM. It is called jdeps(.exe). There are two ways you can check your code / repository:


1) We made an initial scan of the Oxygen (4.7) M5 release train repository and most of the violations are in third-party code. You have to work with the providers of the libraries to get this fixed or find an alternative approach.

2) lists alternatives that can be used instead of the internal code. You can see in this list that there's not a replacement for every issue, e.g. sun.misc.Unsafe has no replacement and continues to work, at least for now.

Reflection hacks

Unfortunately jdeps does not detect access to internals made via reflection. You have to check your code for such cases and fix them.

Running Eclipse with Java 9 Support (BETA)

This is useful if you have to debug problems, e.g. when it fails to run your project. We recommend to install the support via because it is crucial that the Eclipse install, the Java 9 VM and the patch match. Another way to install it is to use Ed's Oomph based installer described here:

Java 9 Readiness

If a release train project is not listed here, it means it has not been checked yet, and you have to assume it won't run on Java 9. If something does not work, it should be covered by a bug report.

Project Contact Runs on Java 9 Adds Java 9 Support
Eclipse Project (Platform, JDT, PDE) Dani Megert Yes, but the module needs to be added and we have an open issue with some Platform UI tests due to org.objenesis (bug 508734). Yes, new code to support Java 9 development, compilation, and debugging will be delivered.
Web Tools Platform (WTP) Carl Anderson Not yet tested Yes, new code to support Java 9 facets will be delivered
EclEmma Evgeny Mandrikov Yes Yes, ability to measure code coverage by tests that are executed on Java 9 will be delivered.
Code Recommenders Andreas Sewe Planned but still buggy, mostly due to use of reflection in Gson 2.7 (bug 513634) Not planned yet.
Automated Error Reporting Andreas Sewe Yes n/a (The JEP 259 Stack Walking API looked promising but doesn't work for logged Throwables.)
. . . .

Back to the top