Cubeの日記: 2012: あけおめことよろ
T/O
[CentOS メモ]
Oracle(つーかSun)製 JDK をインストールした後,
以下のシェルスクリプトに適当な名前を付けて sudo で実行すると
#!/bin/bash
if [ ! -f /usr/java/latest/man/ja/man1/java.1.gz ]
then
pushd /usr/java/latest/man/ja/man1 > /dev/null
for MAN in `ls /usr/java/latest/man/ja/man1/*.1`
do
gzip $MAN
done
popd > /dev/null
fi
alternatives --verbose --install /usr/bin/java java /usr/java/latest/bin/java 20000 \
--slave /usr/bin/orbd orbd /usr/java/latest/bin/orbd \
--slave /usr/bin/keytool keytool /usr/java/latest/bin/keytool \
--slave /usr/bin/pack200 pack200 /usr/java/latest/bin/pack200 \
--slave /usr/bin/rmid rmid /usr/java/latest/bin/rmid \
--slave /usr/bin/rmiregistry rmiregistry /usr/java/latest/bin/rmiregistry \
--slave /usr/bin/servertool servertool /usr/java/latest/bin/servertool \
--slave /usr/bin/tnameserv tnameserv /usr/java/latest/bin/tnameserv \
--slave /usr/bin/unpack200 unpack200 /usr/java/latest/bin/unpack200 \
--slave /usr/share/man/man1/java.1.gz java.1.gz /usr/java/latest/man/ja/man1/java.1.gz \
--slave /usr/share/man/man1/keytool.1.gz keytool.1.gz /usr/java/latest/man/ja/man1/keytool.1.gz \
--slave /usr/share/man/man1/orbd.1.gz orbd.1.gz /usr/java/latest/man/ja/man1/orbd.1.gz \
--slave /usr/share/man/man1/pack200.1.gz pack200.1.gz /usr/java/latest/man/ja/man1/pack200.1.gz \
--slave /usr/share/man/man1/rmid.1.gz rmid.1.gz /usr/java/latest/man/ja/man1/rmid.1.gz \
--slave /usr/share/man/man1/rmiregistry.1.gz rmiregistry.1.gz /usr/java/latest/man/ja/man1/rmiregistry.1.gz \
--slave /usr/share/man/man1/servertool.1.gz servertool.1.gz /usr/java/latest/man/ja/man1/servertool.1.gz \
--slave /usr/share/man/man1/tnameserv.1.gz tnameserv.1.gz /usr/java/latest/man/ja/man1/tnameserv.1.gz \
--slave /usr/share/man/man1/unpack200.1.gz unpack200.1.gz /usr/java/latest/man/ja/man1/unpack200.1.gz
alternatives --verbose --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000 \
--slave /usr/bin/appletviewer appletviewer /usr/java/latest/bin/appletviewer \
--slave /usr/bin/apt apt /usr/java/latest/bin/apt \
--slave /usr/bin/extcheck extcheck /usr/java/latest/bin/extcheck \
--slave /usr/bin/jar jar /usr/java/latest/bin/jar \
--slave /usr/bin/jarsigner jarsigner /usr/java/latest/bin/jarsigner \
--slave /usr/bin/javadoc javadoc /usr/java/latest/bin/javadoc \
--slave /usr/bin/javah javah /usr/java/latest/bin/javah \
--slave /usr/bin/javap javap /usr/java/latest/bin/javap \
--slave /usr/bin/jconsole jconsole /usr/java/latest/bin/jconsole \
--slave /usr/bin/jdb jdb /usr/java/latest/bin/jdb \
--slave /usr/bin/jhat jhat /usr/java/latest/bin/jhat \
--slave /usr/bin/jinfo jinfo /usr/java/latest/bin/jinfo \
--slave /usr/bin/jmap jmap /usr/java/latest/bin/jmap \
--slave /usr/bin/jps jps /usr/java/latest/bin/jps \
--slave /usr/bin/jrunscript jrunscript /usr/java/latest/bin/jrunscript \
--slave /usr/bin/jsadebugd jsadebugd /usr/java/latest/bin/jsadebugd \
--slave /usr/bin/jstack jstack /usr/java/latest/bin/jstack \
--slave /usr/bin/jstat jstat /usr/java/latest/bin/jstat \
--slave /usr/bin/jstatd jstatd /usr/java/latest/bin/jstatd \
--slave /usr/bin/native2ascii native2ascii /usr/java/latest/bin/native2ascii \
--slave /usr/bin/policytool policytool /usr/java/latest/bin/policytool \
--slave /usr/bin/rmic rmic /usr/java/latest/bin/rmic \
--slave /usr/bin/schemagen schemagen /usr/java/latest/bin/schemagen \
--slave /usr/bin/serialver serialver /usr/java/latest/bin/serialver \
--slave /usr/bin/wsgen wsgen /usr/java/latest/bin/wsgen \
--slave /usr/bin/wsimport wsimport /usr/java/latest/bin/wsimport \
--slave /usr/bin/xjc xjc /usr/java/latest/bin/xjc \
--slave /usr/share/man/man1/appletviewer.1.gz appletviewer.1.gz /usr/java/latest/man/ja/man1/appletviewer.1.gz \
--slave /usr/share/man/man1/apt.1.gz apt.1.gz /usr/java/latest/man/ja/man1/apt.1.gz \
--slave /usr/share/man/man1/extcheck.1.gz extcheck.1.gz /usr/java/latest/man/ja/man1/extcheck.1.gz \
--slave /usr/share/man/man1/jar.1.gz jar.1.gz /usr/java/latest/man/ja/man1/jar.1.gz \
--slave /usr/share/man/man1/jarsigner.1.gz jarsigner.1.gz /usr/java/latest/man/ja/man1/jarsigner.1.gz \
--slave /usr/share/man/man1/javac.1.gz javac.1.gz /usr/java/latest/man/ja/man1/javac.1.gz \
--slave /usr/share/man/man1/javadoc.1.gz javadoc.1.gz /usr/java/latest/man/ja/man1/javadoc.1.gz \
--slave /usr/share/man/man1/javah.1.gz javah.1.gz /usr/java/latest/man/ja/man1/javah.1.gz \
--slave /usr/share/man/man1/javap.1.gz javap.1.gz /usr/java/latest/man/ja/man1/javap.1.gz \
--slave /usr/share/man/man1/jconsole.1.gz jconsole.1.gz /usr/java/latest/man/ja/man1/jconsole.1.gz \
--slave /usr/share/man/man1/jdb.1.gz jdb.1.gz /usr/java/latest/man/ja/man1/jdb.1.gz \
--slave /usr/share/man/man1/jhat.1.gz jhat.1.gz /usr/java/latest/man/ja/man1/jhat.1.gz \
--slave /usr/share/man/man1/jinfo.1.gz jinfo.1.gz /usr/java/latest/man/ja/man1/jinfo.1.gz \
--slave /usr/share/man/man1/jmap.1.gz jmap.1.gz /usr/java/latest/man/ja/man1/jmap.1.gz \
--slave /usr/share/man/man1/jps.1.gz jps.1.gz /usr/java/latest/man/ja/man1/jps.1.gz \
--slave /usr/share/man/man1/jrunscript.1.gz jrunscript.1.gz /usr/java/latest/man/ja/man1/jrunscript.1.gz \
--slave /usr/share/man/man1/jsadebugd.1.gz jsadebugd.1.gz /usr/java/latest/man/ja/man1/jsadebugd.1.gz \
--slave /usr/share/man/man1/jstack.1.gz jstack.1.gz /usr/java/latest/man/ja/man1/jstack.1.gz \
--slave /usr/share/man/man1/jstat.1.gz jstat.1.gz /usr/java/latest/man/ja/man1/jstat.1.gz \
--slave /usr/share/man/man1/jstatd.1.gz jstatd.1.gz /usr/java/latest/man/ja/man1/jstatd.1.gz \
--slave /usr/share/man/man1/native2ascii.1.gz native2ascii.1.gz /usr/java/latest/man/ja/man1/native2ascii.1.gz \
--slave /usr/share/man/man1/policytool.1.gz policytool.1.gz /usr/java/latest/man/ja/man1/policytool.1.gz \
--slave /usr/share/man/man1/rmic.1.gz rmic.1.gz /usr/java/latest/man/ja/man1/rmic.1.gz \
--slave /usr/share/man/man1/schemagen.1.gz schemagen.1.gz /usr/java/latest/man/ja/man1/schemagen.1.gz \
--slave /usr/share/man/man1/serialver.1.gz serialver.1.gz /usr/java/latest/man/ja/man1/serialver.1.gz \
--slave /usr/share/man/man1/wsgen.1.gz wsgen.1.gz /usr/java/latest/man/ja/man1/wsgen.1.gz \
--slave /usr/share/man/man1/wsimport.1.gz wsimport.1.gz /usr/java/latest/man/ja/man1/wsimport.1.gz \
--slave /usr/share/man/man1/xjc.1.gz xjc.1.gz /usr/java/latest/man/ja/man1/xjc.1.gz
すると何かと幸せになれる。