By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,439 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,439 IT Pros & Developers. It's quick & easy.

setting JAVA_HOME as a ..... var?

P: n/a
I have a qustion. I have to set a JAVA_HOME variable on a Solaris9
system...

what kind of a variable?
A system-defined.../....a user defined.../.....????

and how do I set this so java can work with it? I need this to be
used by Tomcat at a webserver.....

Thanks already,
Johan.

Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Wed, 03 Sep 2003 14:22:00 +0200, Johan Louwers
<su****************@dds.nl> two-finger typed:
I have a qustion. I have to set a JAVA_HOME variable on a Solaris9
system...

what kind of a variable?
A system-defined.../....a user defined.../.....????
An environment variable.

set java_home="/usr/local/java/jsdk1.4.2/" ;
export java_home ;

Somewhere in the script that starts tomcat.

It normally points at the base directory for the jdk or jre.

and how do I set this so java can work with it? I need this to be
used by Tomcat at a webserver.....

Thanks already,
Johan.


Cheers.
Jul 17 '05 #2

P: n/a
Nope,
it is not working when I use

set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
export JAVA_HOME;

When i like to start tomcat using ./startup.sh I get the error:

The JAVA_HOME enviroment variable is not definded this enviroment
variable is needed to run this program.

I placed the following command in the startup.sh script

JAVA_HOME="/usr/local/j2sdk1.4.1_05";
export JAVA_HOME;

And tomcat is starting like this:

#./startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA_HOME /usr/local/j2sdk1.4.1_05

When i like to check if the service is runnig by connecting to
http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
page that the location can not be found.....

So i do ./shutdown.sh and the following is reported:

#./startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA_HOME /usr/local/j2sdk1.4.1_05
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/catalina/startup/Bootstrap
What is the problem? do you have any clue? Please help........
On Wed, 03 Sep 2003 16:28:46 +0200, Neomorph
<ne******@nospam.demon.co.uk> wrote:
On Wed, 03 Sep 2003 14:22:00 +0200, Johan Louwers
<su****************@dds.nl> two-finger typed:
I have a qustion. I have to set a JAVA_HOME variable on a Solaris9
system...

what kind of a variable?
A system-defined.../....a user defined.../.....????


An environment variable.

set java_home="/usr/local/java/jsdk1.4.2/" ;
export java_home ;

Somewhere in the script that starts tomcat.

It normally points at the base directory for the jdk or jre.

and how do I set this so java can work with it? I need this to be
used by Tomcat at a webserver.....

Thanks already,
Johan.


Cheers.


Jul 17 '05 #3

P: n/a
Are you running the tomcat start/stop scripts directly from the
tomcat/bin directory? That is,
cd /usr/local/jakarta-tomcat-4.1.27/bin
../startup.sh


Johan Louwers <su****************@dds.nl> wrote in message news:<4e********************************@4ax.com>. ..
Nope,
it is not working when I use

set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
export JAVA_HOME;

When i like to start tomcat using ./startup.sh I get the error:

The JAVA_HOME enviroment variable is not definded this enviroment
variable is needed to run this program.

I placed the following command in the startup.sh script

JAVA_HOME="/usr/local/j2sdk1.4.1_05";
export JAVA_HOME;

And tomcat is starting like this:

#./startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA_HOME /usr/local/j2sdk1.4.1_05

When i like to check if the service is runnig by connecting to
http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
page that the location can not be found.....

So i do ./shutdown.sh and the following is reported:

#./startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA_HOME /usr/local/j2sdk1.4.1_05
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/catalina/startup/Bootstrap

Jul 17 '05 #4

P: n/a
"Johan Louwers" <su****************@dds.nl> wrote in message
news:4e********************************@4ax.com...
Nope,
it is not working when I use

set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
export JAVA_HOME;


Do you mean from the command line? If you're using c shell,
the syntax would be:

setenv JAVA_HOME "/usr/local/j2sdk1.4.1_05"

P.S. You don't need the semicolons unless you're putting two
shell commands on one line, and then only between the
commands.

-Wm
Jul 17 '05 #5

P: n/a
On Thu, 04 Sep 2003 10:49:07 +0200, Johan Louwers
<su****************@dds.nl> two-finger typed:
Nope,
it is not working when I use

set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
export JAVA_HOME;

When i like to start tomcat using ./startup.sh I get the error:

The JAVA_HOME enviroment variable is not definded this enviroment
variable is needed to run this program.

I placed the following command in the startup.sh script

JAVA_HOME="/usr/local/j2sdk1.4.1_05";
export JAVA_HOME;

And tomcat is starting like this:

#./startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA_HOME /usr/local/j2sdk1.4.1_05

When i like to check if the service is runnig by connecting to
http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
page that the location can not be found.....

So i do ./shutdown.sh and the following is reported:

#./startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA_HOME /usr/local/j2sdk1.4.1_05
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/catalina/startup/Bootstrap
What is the problem? do you have any clue? Please help........


That sounds like a typical java problem.

Looks like the Tomcat classes (JAR files) need to be put into the CLASSPATH
environment variable as well.

Roady Green usually has a classpath explaining link in his repetoire, but
basically, it works the same as the PATH, except you have to list the
actual JAR files, not the directory they are in.

Cheers.

Jul 17 '05 #6

P: n/a
Just out of curiosity, did you change the JAVA_HOME variable in
catalina.sh? That's what I did, and it works perfectly.

Neomorph <ne******@nospam.demon.co.uk> wrote in message news:<gi********************************@4ax.com>. ..
On Thu, 04 Sep 2003 10:49:07 +0200, Johan Louwers
<su****************@dds.nl> two-finger typed:
Nope,
it is not working when I use

set JAVA HOME="/usr/local/j2sdk1.4.1 05";
export JAVA HOME;

When i like to start tomcat using ./startup.sh I get the error:

The JAVA HOME enviroment variable is not definded this enviroment
variable is needed to run this program.

I placed the following command in the startup.sh script

JAVA HOME="/usr/local/j2sdk1.4.1 05";
export JAVA HOME;

And tomcat is starting like this:

#./startup.sh
Using CATALINA BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA HOME /usr/local/j2sdk1.4.1 05

When i like to check if the service is runnig by connecting to
http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
page that the location can not be found.....

So i do ./shutdown.sh and the following is reported:

#./startup.sh
Using CATALINA BASE: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA HOME: /usr/local/jakarta-tomcat-4.1.27
Using CATALINA TMPDIR /usr/local/jakarta-tomcat-4.1.27
USING JAVA HOME /usr/local/j2sdk1.4.1 05
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/catalina/startup/Bootstrap
What is the problem? do you have any clue? Please help........


That sounds like a typical java problem.

Looks like the Tomcat classes (JAR files) need to be put into the
CLASSPATH
environment variable as well.

Roady Green usually has a classpath explaining link in his repetoire, but
basically, it works the same as the PATH, except you have to list the
actual JAR files, not the directory they are in.

Cheers.

Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.