Installar Java 8 JDK Debian 7, CentOS

Actualizando:

apt-get update

Descargando java 8 JDK

1
cd /opt/

64Bits

1
2
3
sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz"

tar -zxvf jdk-8u25-linux-x64.tar.gz

32 Bits

1
2
3
sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-i586.tar.gz"

tar -zxvf jdk-8u25-linux-i586.tar.gz

Preparando el Directorio de instalación e Instalando:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# cd /opt/jdk1.8.0_25/
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_25/bin/java 2
sudo update-alternatives --config java


There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /opt/jdk1.8.0/bin/java
 + 2           /opt/jdk1.7.0_55/bin/java
   3           /opt/jdk1.8.0_25/bin/java

Enter to keep the current selection[+], or type selection number: 3

sudo update-alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_25/bin/jar 2
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_25/bin/javac 2
sudo update-alternatives --set jar /opt/jdk1.8.0_25/bin/jar
sudo update-alternatives --set javac /opt/jdk1.8.0_25/bin/javac

Variables:

1
2
3
export JAVA_HOME=/opt/jdk1.8.0_25
export JRE_HOME=/opt/jdk1.8.0_25/jre
export PATH=$PATH:/opt/jdk1.8.0_25/bin:/opt/jdk1.8.0_25/jre/bin

Agrega esto es si ya extrajiste glassfish en su directorio:

1
export GLASSFISH_HOME=/usr/glassfishv3/glassfish
 && export PATH=$JAVA_HOME/bin:$GLASSFISH_HOME/bin:$PATH
Esta entrada fue publicada en Glassfish. Guarda el enlace permanente.

24 respuestas a Installar Java 8 JDK Debian 7, CentOS

  1. Pingback: glen

  2. Pingback: gerald

  3. Pingback: troy

  4. Pingback: shane

  5. Pingback: Robert

  6. Pingback: Warren

  7. Pingback: marshall

  8. Pingback: Jimmie

  9. Pingback: bruce

  10. Pingback: Andre

  11. Pingback: bill

  12. Pingback: warren

  13. Pingback: andrew

  14. Pingback: trevor

  15. Pingback: Terrence

  16. Pingback: louis

  17. Pingback: lloyd

  18. Pingback: tyler

  19. Pingback: Ricky

  20. Pingback: Micheal

  21. Pingback: juan

  22. Pingback: Ramon

  23. Pingback: Tommy

  24. Pingback: Alex

Deja un comentario