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

  • Mastering Apache Storm
  • Ankit Jain
  • 136字
  • 2021-07-02 20:32:28

Installing Java SDK 7

Perform the following steps to install the Java SDK 7 on your machine. You can also go with JDK 1.8:

  1. Download the Java SDK 7 RPM from Oracle's site (http://www.oracle.com/technetwork/java/javase/downloads/index.html).
  2. Install the Java jdk-7u<version>-linux-x64.rpm file on your CentOS machine using the following command:
sudo rpm -ivh jdk-7u<version>-linux-x64.rpm 
  1. Add the following environment variable in the ~/.bashrc file:
export JAVA_HOME=/usr/java/jdk<version>
  1. Add the path of the bin directory of the JDK to the PATH system environment variable to the ~/.bashrc file:
export PATH=$JAVA_HOME/bin:$PATH 
  1. Run the following command to reload the bashrc file on the current login terminal:
source ~/.bashrc
  1. Check the Java installation as follows:
java -version  

The output of the preceding command is as follows:

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) 
主站蜘蛛池模板: 商南县| 布拖县| 贵溪市| 淄博市| 无锡市| 元朗区| 荥经县| 吉林省| 青海省| 图木舒克市| 尼玛县| 广宁县| 高淳县| 理塘县| 普陀区| 泽库县| 额济纳旗| 铜川市| 安岳县| 隆德县| 积石山| 井冈山市| 普兰店市| 翁源县| 论坛| 绥芬河市| 大石桥市| 舞阳县| 牟定县| 新平| 巩留县| 射阳县| 夏邑县| 新和县| 井陉县| 巴林左旗| 德化县| 巨野县| 治县。| 江安县| 凤山县|