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

  • 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) 
主站蜘蛛池模板: 咸丰县| 融水| 庄浪县| 泰来县| 浙江省| 宾阳县| 莱阳市| 瑞丽市| 巴林右旗| 平顶山市| 南平市| 嵩明县| 呼和浩特市| 墨玉县| 商河县| 岐山县| 西乌珠穆沁旗| 南召县| 微山县| 涟源市| 兴海县| 肥乡县| 噶尔县| 陇川县| 方山县| 河南省| 荆州市| 鄂伦春自治旗| 海安县| 定州市| 遵化市| 上林县| 当涂县| 岱山县| 洪泽县| 台南市| 贵州省| 商河县| 陇川县| 平顺县| 马边|