Skip to content

Instantly share code, notes, and snippets.

@hoangnguyen115
hoangnguyen115 / java-update-alternatives.md
Created October 11, 2023 03:41 — forked from bench/java-update-alternatives.md
java and javac update-alternatives

update-alternatives maintains symbolic links determining default commands This is a reminder to install java and javac alternatives.

Install alternatives

Install java compiler alternatives

$ sudo update-alternatives --install /usr/bin/javac javac /home/bchenebault/Apps/jdk1.5.0_22/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javac javac /home/bchenebault/Apps/jdk1.6.0_45/bin/javac 2