JDK10 is used instead of openjdk8 on Mac OS X

Hi. I’ve noticed that when I try to use JDK8 on Mac OS X, the system anyway selects JDK10. See for example output of this job. It is labeled JDK: openjdk8 , but it prints:

$ java -Xmx32m -version 
java version "10.0.1" 2018-04-17 
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode) 
$ javac -J-Xmx32m -version 
javac 10.0.1 
$ java -version 
java version "10.0.1" 2018-04-17

If you need OpenJDK 8, please select the osx_image that has it. Newer images do not have a means of installing OpenJDK 8.

1 Like