How to Install Java Alternatives in Ubuntu
This script will let you install Java alternatives in Ubuntu. In short, you can install multiple versions of Java and activate any one of th...
This script will let you install Java alternatives in Ubuntu. In short, you can install multiple versions of Java and activate any one of them at a time.
For example, let's assume that you already have an OpenJDK version 11 installed and you want to install GraalVM as well. These are the commands to do it, we are adding GraalVM in slot 2.sudo update-alternatives --install /usr/bin/java java /opt/graalvm-ce-java11-21.0.0/bin/java 2 sudo update-alternatives --install /usr/bin/javac javac /opt/graalvm-ce-java11-21.0.0/bin/javac 2To change the active java version, execute:
sudo update-alternatives --config javaAnd select the desired version.
This is how you install OpenJDK 11 in Ubuntu: https://www.czetsuyatech.com/2021/03/install-openjdk-11-in-ubuntu.html
Post a Comment