Java 9 is scheduled to release on September 21. If you want to try Java 9 early-access builds now, you can download them from jdk.java.net and install them locally. However, installing the Java 9 builds makes them the default JDK in your machine, which may affect other applications that depend on the JDK. A better choice is to use Docker. If you don’t have Docker installed, download and install it from docker.com.
The Docker image we are going to use is the official Apache Maven image which supports Java 9. We use the tag
3.5.0-jdk-9 to get the Maven 3.5.0 with JDK 9.