官术网_书友最值得收藏!

Installing Java

Follow these steps to install Java:

  1. Move to the /tmp directory and download Java:
        cd /tmp 
wget -O java_8.131.rpm \
http://javadl.oracle.com/webapps/download/AutoDL? \
BundleId=220304_d54c1d3a095b4ff2b6607d096fa80163
  1. Next, install Java. The following command will install the JRE:
        sudo rpm -ivh java_8.131.rpm 
  1. To set the JAVA_HOME environment variable, first get the Java installation's location. Do this by executing the following command:
        sudo alternatives --config java       
  1. The previous command will print the list of Java applications installed on your machine, along with their installation paths. Copy the Java path that appears on your Terminal:
        There is 1 program that provides 'java'. 
        Selection    Command 
        ----------------------------------------------- 
        *+ 1           /usr/java/jre1.8.0_131/bin/java
  1. Add the Java path (the one that you copied earlier) inside the /etc/environment file using the following command:
        sudo sh \
-c "echo JAVA_HOME=/usr/java/jre1.8.0_131 >>
/etc/environment"
主站蜘蛛池模板: 大同市| 辽中县| 开平市| 大理市| 梓潼县| 黄山市| 勐海县| 湾仔区| 徐闻县| 油尖旺区| 巨野县| 襄汾县| 大宁县| 六安市| 安宁市| 古交市| 上蔡县| 黄龙县| 东乡县| 资阳市| 镇康县| 米泉市| 临湘市| 灵宝市| 新津县| 河源市| 蒙阴县| 梧州市| 彭州市| 蓝山县| 余江县| 清流县| 宁都县| 林西县| 阿坝| 玉树县| 江油市| 兴义市| 陆丰市| 河东区| 夹江县|