Set Java version on Ubuntu/Mint

update-alternatives --list java
sudo update-alternatives --install /usr/bin/java java /opt/jdk-14.0.2/bin/java 0
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk-14.0.2/bin/javac 0
sudo update-alternatives --set java /opt/jdk-14.0.2/bin/java
sudo update-alternatives --set javac /opt/jdk-14.0.2/bin/javac

Leave a Reply

Your email address will not be published. Required fields are marked *