Build randomly using jdk 13 despite osx_image: xcode10.1

having the same issue as Build randomly using jdk 13 but I do specify osx_image: xcode10.1 as suggested there.

xcode10.1 provides jdk 13 instead of 11 as per .

    - os: osx
      osx_image: xcode10.1


$ java -Xmx32m -version
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

build error:

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 57

tried emptying the cache and restart the job with no success.


I have the same issue - here’s one of the failing builds:

Towards the end of the Build system information section, the jdk version is displayed:

Java version: 13.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-13.0.1.jdk/Contents/Home

(I’m also using xcode10.1)

As was apparently done for the above build, a possible workaround is to switch to xcode9.4.

I’m not sure how long that will remain the case, however. I’m assuming since there was a change that these are not immutable images, and that they may be rebuilt and get the newer java version as a result ?

Update: indeed, the xcode9.4 image is now also affected and uses java 13. I don’t think it’s reasonable to expect any macOs testing to rely on the latest, just-released (non-LTS!) JDK version.
Edit - build example: