linux に java (JDK(JRE含む))導入
●現時点で最新のJDKを導入。
[taro@localhost ~]$ wget -O jdk-7u4-linux-i586.rpm --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u4-b20/jdk-7u4-linux-i586.rpm"
●root でインストール
[taro@localhost ~]$ su -
パスワード:
[root@localhost ~]# rpm -ivh /home/taro/jdk-7u4-linux-i586.rpm
準備中... ########################################### [100%]
1:jdk ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
plugin.jar...
javaws.jar...
deploy.jar...
[root@localhost ~]# exit
logout
●JDK
[taro@localhost ~]$ which javac
/usr/bin/javac
[taro@localhost ~]$ javac -version
javac 1.7.0_04
●JRE
[taro@localhost ~]$ which java
/usr/bin/java
[taro@localhost ~]$ java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode, sharing)
●導入環境
CentOS release 5.7 (Final)
CentOS release 6.2 (Final)