Skip to content

Instantly share code, notes, and snippets.

@djangofan
Created April 25, 2012 20:36
Show Gist options
  • Save djangofan/2493145 to your computer and use it in GitHub Desktop.
Save djangofan/2493145 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