Hi @chemika,
Welcome to the CircleCI community!
I would suggest using the new ubuntu-2004:202008-01
machine executor image, already available for early preview. It comes with OpenJDK 11 as the default version.
However, I strongly advise you to read this post before deciding to use that new image.
Alternatively, you could keep using the ubuntu-1604:202007-01
machine image and upgrade OpenJDK to version 11, as follows:
version: 2.1
jobs:
build:
machine:
image: ubuntu-1604:202007-01
steps:
- run:
name: Install OpenJDK 11
command: |
sudo apt-get update && sudo apt-get install openjdk-11-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
java -version
workflows:
build_and_test:
jobs:
- build