DIGIT-ARC read-only archive · snapshot: July 23, 2026

upgrade java version

4 posts · originally from https://geek.digit.in/community/threads/upgrade-java-version.106749/

iinfi
iinfi Original post #1
Jan 16, 2009 at 5:02 PM
when i installed Cent OS on my machine jre-1.4.2 was automatically installed.
java -version command gives the output.
java version 1.4.2

now i have installed jdk-1.6_11 or jre 1.6 on the machine. now my java -version command still shows 1.4.2

i changed the path variable in /root/.bash_profile
Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/usr/java/jdk1.6.0_11/bin
JAVA_HOME=/usr/java/jdk1.6.0_11
## JAVA=/usr/java/jdk1.6.0_11/bin
export PATH
export JAVA_HOME

unset USERNAME
plz let me know where i m going wrong.

thanks
thinknano
Jan 16, 2009 at 5:28 PM
:O what to do????
mediator
Jan 16, 2009 at 10:01 PM
append $PATH to the last!
PATH=$HOME/bin:/usr/java/jdk1.6.0_11/bin:$PATH
That shud work!

or else the standard procedure is this!
*news.softpedia.com/news/How-to-Install-Java-in-Fedora-Core-6-39724.shtml
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_11/bin/java 2
/usr/sbin/alternatives --config java
iinfi
iinfi #4
Jan 17, 2009 at 12:23 PM
thanks man ... will try it in off on monday.
tc