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

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"
主站蜘蛛池模板: 剑河县| 定西市| 崇信县| 潞城市| 西华县| 荣昌县| 万宁市| 慈利县| 抚州市| 安义县| 佛山市| 南澳县| 丹江口市| 墨脱县| 郯城县| 石台县| 曲沃县| 万荣县| 湄潭县| 南丰县| 汉沽区| 来宾市| 吉林省| 景泰县| 贵港市| 孟州市| 娱乐| 崇阳县| 吴忠市| 北宁市| 古田县| 保靖县| 靖远县| 徐州市| 新龙县| 兴义市| 甘德县| 博客| 石狮市| 上高县| 伊春市|