Then, we need to install and configure Java (replace java-8-openjdk-amd64 with your version of Java):
jenkins@ci:# sudo apt update && sudo apt install -y openjdk-8-jdk
jenkins@ci:# echo 'JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"' | sudo tee --append /etc/environment > /dev/null
At the time of this writing, Jenkins work best with Java 8. Java 10 and 11 support are still experimental (see jenkins.io/blog/2018/06/17/running-jenkins-with-java10-11/). This is why we are using the openjdk-8-jdk package instead of default-jdk.