If I understand you correctly then if you look at your $PATH variable it is finding java sooner in the path than your newly appended version in $JAVA_HOME. So you can either remove the old version (or even just rename the binary file or remove the execute bit) or else modify your path to place the new $JAVA_HOME location before the other one (prepend to $PATH instead of append) or you could even remove the directory of the old one from $PATH but this last one may have other unintended consequences.

 

 

From: tclug-list-bounces at mn-linux.org [mailto:tclug-list-bounces at mn-linux.org] On Behalf Of Sean Waite
Sent: Tuesday, September 14, 2010 2:47 PM
To: TCLUG Mailing List
Subject: [tclug-list] Sun java on Redhat 5.5

 

When I installed Sun's java 1.6 in CentOS, I merely made /usr/java folder, downloaded the file and extracted. Then added:

# JAVA

JAVA_HOME="/usr/java/jre1.6.0_21/bin"

export JAVA_HOME

export JAVA_PATH="$JAVA_HOME"

export PATH="$PATH:$JAVA_HOME"


to /etc/profile, and then "java -version" correctly displayed my version, and the app that requires java 1.6 ran just fine.

However I am unfamiliar with Red Hat enterprise. I repeated the same steps as I did for CentOS (which had no java version installed anyways). Also, doing "whereis java" shows /usr/share/java" as the path. This version being 1.4.2 we are told is not compatible, so that is why I need to get 1.6 (Sun's version) installed. 

What exactly am I missing here? I always thought that if I put the path to "/etc/profile" that this would be sufficient. Redhat does have a config file in "/etc/java/java.conf" that I can edit, but do not know if I should touch this or not. 


Please help a very dim nub out here.


Sean

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20100914/0548bf98/attachment.htm