Hi Ed, Thanks for your help. I saw which java and it told me /usr/bin I changed the path as u mentioned. I do it by following /etc/profile.d/java.sh JAVA_HOME=/usr/local/jdk1.3.1_08 PATH=$JAVA_HOME:$PATH/bin export JAVA_HOME but when I opened a new shell and wrote java-version, it gave me the same problem. I thought that in the path /usr/bin will be executing first instead of /etc/profile.d/java.sh. But I dont find anything like /etc/profile.d etc, in the path PATH=/usr/local/jdk1.3.1_08:/usr/kerberos/sbin:/usr/ke rberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/ usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/jdk1.3.1_0 8/bin:/root/bin:/usr/local/ant/bin/bin Then, I found a solution by going to /usr/bin directory and did chmod -x java and now it works [root@xxxxxxxxx root]# java -version java version "1.3.1_08" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_08-b03) Java HotSpot(TM) Client VM (build 1.3.1_08-b03, mixed mode) Can you suggest me why did the earlier solution did not work? Thanks, my program has now found the sun's classes. Cheers, Rebel --- Ed Greshko <Ed.Greshko@xxxxxxxxxxx> wrote: > Type "which java" when you are in your home > directory and you will note > that the java being found is in a directory that > appears in your PATH > prior to $JAVA_HOME/bin. > > An "easy" way around this would be > to....PATH=$JAVA_HOME/bin:$PATH and > export that... __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com