Skip to content

Instantly share code, notes, and snippets.

@p4535992
Forked from djangofan/gist:2493145
Created August 29, 2017 17:52
Show Gist options
  • Select an option

  • Save p4535992/f9ea1a8d47af5a4e404c6472fc6e0d96 to your computer and use it in GitHub Desktop.

Select an option

Save p4535992/f9ea1a8d47af5a4e404c6472fc6e0d96 to your computer and use it in GitHub Desktop.
Using etc alternatives to set default Java on CentOS
[user@www]# alternatives --install /usr/bin/java java /opt/jdk1.6.0_07/bin/java 2
[user@www]# alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /opt/jdk1.6.0_07/bin/java
Enter to keep the current selection[+], or type selection number: 2
[user@www]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment