linuxにjdkをインストールした。
以下のサイトからjdk-1_5_0_09-linux-i586.binをダウンロード
http://java.sun.com/j2se/1.5.0/ja/download.html
http://192.18.108.205/ECom/EComTicketServlet/BEGIN5C3A8883F47B53F0AB26464331605F92/-2147483648/1715342247/1/772394/772130/1715342247/2ts+/westCoastFSEND/jdk-1.5.0_09-oth-JPR/jdk-1.5.0_09-oth-JPR:4/jdk-1_5_0_09-linux-i586.bin
インストール場所(/usr/local)に移動
# cp /hoge/public/jdk-1_5_0_09-linux-i586.bin /usr/local/
インストール開始(同意書にyes)
# ./jdk-1_5_0_09-linux-i586.bin
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0
SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION
THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY
CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS
(COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT
CAREFULLY. BY DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU
ACCEPT THE TERMS OF THE AGREEMENT. INDICATE ACCEPTANCE BY
SELECTING THE "ACCEPT" BUTTON AT THE BOTTOM OF THE
AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE
TERMS, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THE
AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT
CONTINUE.
1. DEFINITIONS. "Software" means the identified above in
binary form, any other machine readable materials
(including, but not limited to, libraries, source files,
header files, and data files), any updates or error
corrections provided by Sun, and any user manuals,
Do you agree to the above license terms? [yes or no]
yes
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/jinfo.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/jmap.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/jps.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/jsadebugd.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/jstack.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/jstat.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/jstatd.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/native2ascii.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/rmic.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/serialver.1
inflating: jdk1.5.0_09/man/ja_JP.eucJP/man1/idlj.1
Creating jdk1.5.0_09/lib/tools.jar
Creating jdk1.5.0_09/jre/lib/rt.jar
Creating jdk1.5.0_09/jre/lib/jsse.jar
Creating jdk1.5.0_09/jre/lib/charsets.jar
Creating jdk1.5.0_09/jre/lib/ext/localedata.jar
Creating jdk1.5.0_09/jre/lib/plugin.jar
Creating jdk1.5.0_09/jre/lib/javaws.jar
Creating jdk1.5.0_09/jre/lib/deploy.jar
Done.
# /usr/local/jdk1.5.0_09/bin/java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)
ディレクトリ名称が扱いづらいので変更し、シンボリックリンクを張る。
# ls
DiCE/ include/ mysql/ sbin/
apache2/ info/ mysql-4.1.7/ share/
bin/ jdk-1_5_0_09-linux-i586.bin* mysql-4.1.7.tar.gz src/
doc/ jdk1.5.0_09/ mysql-5.0.22.tar.gz* vnc/
etc/ lib/ php-5.0.2/
games/ man/ php-5.0.2.tar.gz*
# mv jdk1.5.0_09/ j2sdk
# ls
DiCE/ include/ mysql/ sbin/
apache2/ info/ mysql-4.1.7/ share/
bin/ j2sdk/ mysql-4.1.7.tar.gz src/
doc/ jdk-1_5_0_09-linux-i586.bin* mysql-5.0.22.tar.gz* vnc/
etc/ lib/ php-5.0.2/
games/ man/ php-5.0.2.tar.gz*
# ln -s jdk1.5.0_09 j2sdk
環境変数にパスを通し,今後の為にJAVA_HOMEを設定。
# vi .bashrc
#20061009 add
export JAVA_HOME=/usr/local/j2sdk
export PATH=$PATH:$JAVA_HOME/bin
反映
# source ~/.bash_profile
動作確認(パスもOK)
# java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)