I have an application that uses JDK 11 and this application also uses a docker library (Testcontainer) for testing and I therefore need to use the Machine type executor.
The default ubuntu image for machine type runs on JDK8.
Is there already a new Ubuntu image with JDK 11 installed or how can I achieve this?
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:
name: Install OpenJDK 11
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
@yannCI Thanks …This was really helpful…
is there an image for jdk-17?
awesome! thank you for tagging me in here