[Linux] Instalación JDK
***********************
INSTALACION JDK 1.7.0_21
************************
1º Instala el JDK.
download here
rpm -ivh
2º Comprobar la ruta donde se ha instalado
/usr/java/jdk1.7.0_21/bin
3º Utilizar "alternatives" para establecer el JDK por defecto del sistema:
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_21/bin/java 16026
/usr/sbin/alternatives --display java
/usr/sbin/alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
* 2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
+ 3 /usr/java/jdk1.7.0_21/bin/java
Enter to keep the current selection[+], or type selection number: ^C
[root@oel6 bin]# java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
[root@oel6 bin]#
INSTALACION JDK 1.7.0_21
************************
1º Instala el JDK.
download here
rpm -ivh
2º Comprobar la ruta donde se ha instalado
/usr/java/jdk1.7.0_21/bin
3º Utilizar "alternatives" para establecer el JDK por defecto del sistema:
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_21/bin/java 16026
/usr/sbin/alternatives --display java
/usr/sbin/alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
* 2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
+ 3 /usr/java/jdk1.7.0_21/bin/java
Enter to keep the current selection[+], or type selection number: ^C
[root@oel6 bin]# java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
[root@oel6 bin]#
Comentarios