upgrade java version

Status
Not open for further replies.

iinfi

mekalodu
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
 

mediator

Technomancer
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
 
Status
Not open for further replies.
Top Bottom