Jan 13
jdk - install
# java -version
java version “1.4.2″
gcj (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# ./jdk-1_5_0_04-linux-i586.bin
….
Do you agree to the above license terms? [yes or no]
yes
….
inflating: jdk1.5.0_04/man/ja_JP.eucJP/man1/javac.1
….
inflating: jdk1.5.0_04/man/ja_JP.eucJP/man1/idlj.1
Creating jdk1.5.0_04/lib/tools.jar
….
Creating jdk1.5.0_04/jre/lib/deploy.jar
Done.
# mv jdk1.5.0_04/ /usr/local/
# ln -s /usr/local/jdk1.5.0_04 /usr/local/java
# ll /usr/local/
lrwxrwxrwx 1 root root 22 Aug 2 10:55 java -> /usr/local/jdk1.5.0_04
drwxr-xr-x 9 root root 4096 Aug 2 10:54 jdk1.5.0_04
# which java
/usr/bin/java
# ll /usr/bin/java
lrwxrwxrwx 1 root root 22 Jul 20 11:24 /usr/bin/java -> /etc/alternatives/java
# rm /usr/bin/java
rm: remove symbolic link `/usr/bin/java’? y
# ln -s /usr/local/jdk1.5.0_04/bin/java /usr/bin/java
# ll /usr/bin/java
lrwxrwxrwx 1 root root 31 Aug 2 11:00 /usr/bin/java -> /usr/local/jdk1.5.0_04/bin/java
# java -version
java version “1.5.0_04″
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
# echo “JAVA_HOME=/usr/local/java” >> /etc/profile
# . /etc/profile
# set | grep JAVA_HOME
JAVA_HOME=/usr/local/java

29 January 2007 à 4:28 am
Hi,

I found your blog via google by accident and have to admit that youve a really interesting blog
Just saved your feed in my reader, have a nice day
27 August 2007 à 11:57 am
Hey this is really helpful.I had an application which was developed by another person on Solaris.I had to make it run on Linux. I had nightmares making it run.Only to find this post from you which made me learn that not only do we need to change the env variables JAVA_HOME and PATH but also do this small exercise to change the version of java.
Thanks a lot.