Linux/Alternatives
< Linux
Configure
sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode 1 /usr/bin/gij-4.4 1044 manual mode 2 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode 3 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode Press enter to keep the current choice[*], or type selection number:
reference: https://stackoverflow.com/questions/12787757/how-to-use-the-command-update-alternatives-config-java
Install
--install <link> <name> <path> <priority>
sudo update-alternatives --install /tmp/randomStuff java /usr/local/java/jre1.7.0_25/bin/java 0