Hi Chris,
Thank you for responding.

Alternatives is defaulting to  /usr/local/jdk1.6.0_20/bin/java  (jdk from
sun)

/usr/bin/java has a symlink to -> /usr/local/jdk1.6.0_20/bin/java

We launch Tomcat by  http://localhost:8080
We start it by running tomcat5 from /etc/init.d folder; This file calls
/usr/bin/dtomcat, which sets some env variables.

$CATALINA_HOME is /usr/share/tomcat5 version.sh file is not there in the
/bin folder.

Regards, Andy.
On Thu, Jul 15, 2010 at 2:33 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> To whom it may concern,
>
> (Please set the name in your email client to something, or at least sign
> your messages with your name.)
>
> On 7/15/2010 9:49 AM, testwreq wreq wrote:
> > Hi, Thank you for responding. Below are the commands I used to check
> java. i
> > am confused because which java is reading /usr/bin/java; i think it
> should
> > be /usr/local/jdk1.6.0_20. As you see from the alternatives command, I
> have
> > set the default java to   /usr/local/jdk1.6.0_20/bin/java;
> >
> > Please advise.
> > What is the difference between java_home and jre_home?
>
> java_home and jre_home are both meaningless
>
> JAVA_HOME is the environment variable that points to your installation
> of Java. JRE_HOME is the environment variable that points to your JRE
> installation. Often, these values are the same. I believe many utilities
> look for either or both of these variables.
>
> http://lmgtfy.com/?q=difference+between+JAVA_HOME+and+JRE_HOME
>
> > [r...@www2 conf]# which java
> > /usr/bin/java
>
> No help.
>
> You might want to do less work as "root". It's quite easy to really
> break things when you're root.
>
> How about:
>
> $ java -version
>
> > [r...@www2 conf]# alternatives --config java
> > There are 3 programs which provide 'java'.
> >   Selection    Command
> > -----------------------------------------------
> >    1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
> > *  2           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
> >  + 3           /usr/local/jdk1.6.0_20/bin/java
>
> Great, so you've got 3 Java versions installed:
>
> 1. GNU's Compiler for Java v1.4.2
> 2. OpenJDK v1.6.0 (64-bit version)
> 3. Sun's Java Development Kit v1.6.0_20
>
> It's tough to tell from the output of "alternatives" which version is
> set by default.
>
> > [r...@www2 conf]# echo $JAVA_HOME
> > /usr/local/jdk1.6.0_20
>
> That could indicate that Sun's JDK is currently enabled, but maybe not.
>
> How do you launch Tomcat?
>
> Try running this command and reporting the output:
>
> $CATALINA_HOME/bin/version.sh
>
> (Where CATALINA_HOME is the location of Tomcat; probably something like
> /usr/local/apache-tomcat-6.0.28)
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkw/VH8ACgkQ9CaO5/Lv0PBzwgCfSSxf/G+FoDu69UkIBc5gqIZo
> gloAoLyFWGvofEqWPLpKaZ94R5b1chof
> =wd+Y
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to