sh Instalar Java没有Linux

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Instalar Java没有Linux相关的知识,希望对你有一定的参考价值。

Pagina de referencia: 
*http://www.if-not-true-then-false.com/2014/install-oracle-java-8-on-fedora-centos-rhel/
*http://tecadmin.net/steps-to-install-java-on-centos-5-6-or-rhel-5-6/

1- Executar o instalador do JDK
rpm -Uvh /opt/instaladores/jdk-8u11-linux-x64.rpm

2- Adicionar o jdk no alternatives
alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.8.0_11/jre/bin/java 200000
alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.8.0_11/jre/bin/javaws 200000

3- Selecionar o jdk no alternatives
alternatives --config java
alternatives --config javaws

4- Setar a variavel JAVA_HOME
export JAVA_HOME="/usr/java/jdk1.8.0_11"

5- Adicionar o export ao profile
vi /etc/profile
export JAVA_HOME="/usr/java/jdk1.8.0_11"

6- Conferir a versão atual no terminal
java -version
javac -version

以上是关于sh Instalar Java没有Linux的主要内容,如果未能解决你的问题,请参考以下文章

sh Comando para instalar DEB没有linux

sh Comando para instalar DEB没有linux

sh Comando para instalar DEB没有linux

sh Como instalar CFDISK没有数量

sh Instalar Docker

sh Instalar React Native