Connecting Tech Pros Worldwide Help | Site Map

setting JAVA_HOME as a ..... var?

Johan Louwers
Guest
 
Posts: n/a
#1: Jul 17 '05
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.

Neomorph
Guest
 
Posts: n/a
#2: Jul 17 '05

re: setting JAVA_HOME as a ..... var?


On Wed, 03 Sep 2003 14:22:00 +0200, Johan Louwers
<suntacNOSPAMPLEASE@dds.nl> two-finger typed:
[color=blue]
>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.../.....????[/color]

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.
[color=blue]
>
>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.[/color]

Cheers.
Johan Louwers
Guest
 
Posts: n/a
#3: Jul 17 '05

re: setting JAVA_HOME as a ..... var?


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
<neomorph@nospam.demon.co.uk> wrote:
[color=blue]
>On Wed, 03 Sep 2003 14:22:00 +0200, Johan Louwers
><suntacNOSPAMPLEASE@dds.nl> two-finger typed:
>[color=green]
>>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.../.....????[/color]
>
>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.
>[color=green]
>>
>>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.[/color]
>
>Cheers.[/color]

John L. Webber
Guest
 
Posts: n/a
#4: Jul 17 '05

re: setting JAVA_HOME as a ..... var?


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 <suntacNOSPAMPLEASE@dds.nl> wrote in message news:<4eqdlv4vg2kcsunv7u00tbr57q1c9mq2av@4ax.com>. ..[color=blue]
> 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
>[/color]
William
Guest
 
Posts: n/a
#5: Jul 17 '05

re: setting JAVA_HOME as a ..... var?


"Johan Louwers" <suntacNOSPAMPLEASE@dds.nl> wrote in message
news:4eqdlv4vg2kcsunv7u00tbr57q1c9mq2av@4ax.com...[color=blue]
> Nope,
> it is not working when I use
>
> set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
> export JAVA_HOME;[/color]

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


Neomorph
Guest
 
Posts: n/a
#6: Jul 17 '05

re: setting JAVA_HOME as a ..... var?


On Thu, 04 Sep 2003 10:49:07 +0200, Johan Louwers
<suntacNOSPAMPLEASE@dds.nl> two-finger typed:
[color=blue]
>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........[/color]

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.

Dai Ichi
Guest
 
Posts: n/a
#7: Jul 17 '05

re: setting JAVA_HOME as a ..... var?


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

Neomorph <neomorph@nospam.demon.co.uk> wrote in message news:<gidelvgbr3vonbct94apsdmt905hg8cc9r@4ax.com>. ..[color=blue]
> On Thu, 04 Sep 2003 10:49:07 +0200, Johan Louwers
> <suntacNOSPAMPLEASE@dds.nl> two-finger typed:
>[color=green]
> >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........[/color]
>
> 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.[/color]
Closed Thread


Similar Java bytes