<font face="arial">Here is the full "/etc/profile":<br>_______________________________________________________________________________________________<br><br><div># /etc/profile</div><div><br></div><div># System wide environment and startup programs, for login setup</div><div># Functions and aliases go in /etc/bashrc</div><div><br></div><div>pathmunge () {</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> if [ "$2" = "after" ] ; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> PATH=$PATH:$1</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> else</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> PATH=$1:$PATH</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> fi</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>fi</div><div>}</div><div><br></div><div># ksh workaround</div><div>if [ -z "$EUID" -a -x /usr/bin/id ]; then </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>EUID=`id -u`</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>UID=`id -ru`</div><div>fi</div><div><br></div><div># Path manipulation</div><div>if [ "$EUID" = "0" ]; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>pathmunge /sbin</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>pathmunge /usr/sbin</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>pathmunge /usr/local/sbin</div><div>fi</div><div><br></div><div># No core files by default</div><div>ulimit -S -c 0 > /dev/null 2>&1</div><div><br></div><div>if [ -x /usr/bin/id ]; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>USER="`id -un`"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>LOGNAME=$USER</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>MAIL="/var/spool/mail/$USER"</div><div>fi</div><div><br></div><div>HOSTNAME=`/bin/hostname`</div><div>HISTSIZE=1000</div><div><br></div><div>if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then</div><div> INPUTRC=/etc/inputrc</div><div>fi</div><div><br></div><div>export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC</div><div><br></div><div>for i in /etc/profile.d/*.sh ; do</div><div> if [ -r "$i" ]; then</div><div> if [ "$PS1" ]; then</div><div> . $i</div><div> else</div><div> . $i >/dev/null 2>&1</div><div> fi</div><div> fi</div><div>done</div><div><br></div><div>unset i</div><div>unset pathmunge</div><div># JAVA</div><div>JAVA_HOME="/usr/java/jre1.6.0_21/bin"</div><div>export JAVA_HOME</div><div>export JAVA_PATH="$JAVA_HOME"</div><div>export PATH="$PATH:$JAVA_HOME"</div>_____________________________________________________________________________________________<br><br>Where else would it be reading the 1.4.2 version? I thought by putting this in profile that it would make this the default java to use.<br><br>At Tuesday, 14-09-2010 on 15:14 Justin Krejci wrote:<br><blockquote style="border:0;border-left: 2px solid #22437f; padding:0px; margin:0px; padding-left:5px; margin-left: 5px; ">
<div class="Section1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:black">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.</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:black"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:black"> </span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
tclug-list-bounces@mn-linux.org [mailto:tclug-list-bounces@mn-linux.org] <b>On
Behalf Of </b>Sean Waite<br>
<b>Sent:</b> Tuesday, September 14, 2010 2:47 PM<br>
<b>To:</b> TCLUG Mailing List<br>
<b>Subject:</b> [tclug-list] Sun java on Redhat 5.5</span></p>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Arial","sans-serif"">When
I installed Sun's java 1.6 in CentOS, I merely made /usr/java folder, downloaded
the file and extracted. Then added:</span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""># JAVA</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">JAVA_HOME="/usr/java/jre1.6.0_21/bin"</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">export
JAVA_HOME</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">export
JAVA_PATH="$JAVA_HOME"</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">export
PATH="$PATH:$JAVA_HOME"</span></p>
</div>
<div id="EmailSignature">
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><br>
to /etc/profile, and then "java -version" correctly displayed my
version, and the app that requires java 1.6 ran just fine.<br>
<br>
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. <br>
<br>
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. </span></p>
</div>
<div id="EmailSignature">
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><br>
Please help a very dim nub out here.<br>
<br>
<br>
Sean</span></p><br><br><br><br><br><br><br><br>
</div>
</div>
</blockquote></font>