You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by testwreq wreq <te...@gmail.com> on 2010/07/14 19:08:44 UTC

jsre_home is null

catalina logs are showing jre_home as null. Any ideas how to set it?

Re: jsre_home is null

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy,

On 7/15/2010 2:52 PM, testwreq wreq wrote:
> 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

That's how you access it. I want to know the command you use to start up
the server.

> We start it by running tomcat5 from /etc/init.d folder; This file calls
> /usr/bin/dtomcat, which sets some env variables.

That's it: you have a non-standard Tomcat startup script, then. It's
likely that the Tomcat startup script in /etc/init.d re-configures the
Java environment so that it's not the same as when you run 'java'
directly from the shell.

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

What files /are/ there? catalina.sh ought to be in there. Try this:

$ /usr/share/tomcat5/bin/catalina.sh version

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxAta0ACgkQ9CaO5/Lv0PCozgCghZv+RBiLE2FuHMc3xxBmGy3/
jhoAn0yL3l5WgdYuIj4Q1lPB7C6tpxt+
=she1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsre_home is null

Posted by testwreq wreq <te...@gmail.com>.
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 <
chris@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
>
> > [root@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
>
> > [root@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.
>
> > [root@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: jsre_home is null

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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

> [root@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

> [root@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.

> [root@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsre_home is null

Posted by testwreq wreq <te...@gmail.com>.
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?

[root@www2 conf]# which java
/usr/bin/java

[root@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
[root@www2 conf]# echo $JAVA_HOME
/usr/local/jdk1.6.0_20

On Wed, Jul 14, 2010 at 2:11 PM, Bob Hall <rf...@yahoo.com> wrote:

>
>
> --- On Wed, 7/14/10 at 10:08 AM, testwreq wreq <te...@gmail.com> wrote:
>
> > catalina logs are showing jre_home as
> > null. Any ideas how to set it?
> >
>
> Earlier, in a separate thread, you indicated that java 1.6 was installed.
>
> At the command prompt type:
>
> $ which java
>
> which should display something like:
>
> /usr/local/jdk1.6/bin/java
>
> Depending on the 'shell' you are using you should be able to use of the
> following commands:
>
> $ export JAVA_HOME=/usr/local/jdk1.6
>
> $ setenv JAVA_HOME /usr/local/jdk1.6
>
> This will only set JAVA_HOME for the current 'shell', it is not permanent.
>
> - Bob
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: jsre_home is null

Posted by Bob Hall <rf...@yahoo.com>.

--- On Wed, 7/14/10 at 10:08 AM, testwreq wreq <te...@gmail.com> wrote:

> catalina logs are showing jre_home as
> null. Any ideas how to set it?
> 

Earlier, in a separate thread, you indicated that java 1.6 was installed.

At the command prompt type:

$ which java

which should display something like:

/usr/local/jdk1.6/bin/java

Depending on the 'shell' you are using you should be able to use of the following commands:

$ export JAVA_HOME=/usr/local/jdk1.6

$ setenv JAVA_HOME /usr/local/jdk1.6

This will only set JAVA_HOME for the current 'shell', it is not permanent.  

- Bob


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org