I have an application that needs Java 17 to run successfully, but I am unable to upgrade Java 11 to Java 17 in the config. I have tried other guides, but they have not worked for me. I’m getting this error. > You are using an outdated version of Java (13). Java 17 or higher is required. The JAVA_HOME environment variable is currently set to (/usr/local/jdk-13.0.2).
Any help is greatly appreciated!
To be able to comment we will need more details about your environment and maybe the config.yml file you are working with.
I solved this same issue in my own builds by asking Ubuntu to install Java 17 like this:
steps:
- checkout
- run:
name: Install OpenJDK 17
command: |
sudo apt-get update && sudo apt-get install openjdk-17-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
java -version
Also, just found this which may be helpful: