Tomcat on Windows: JAVA_HOME & -Dsun.io.useCanonCaches'  
Author Message
paul_moloney





PostPosted: 2005-4-4 19:20:00 Top

java-programmer, Tomcat on Windows: JAVA_HOME & -Dsun.io.useCanonCaches' Apologies for posting this here, but I couldn't find any Tomcat user
forum.

A colleague is currently trying to run Tomcat 4.1.30 on Windows 2000
Professional. She first installed JRE2 1.4.2_08, and set %JAVA_HOME%
to the directory C:\j2re1.4.2_08 - I've run "java -version" and it
works fine.
(%JAVA_HOME%/home is in the path correctly).

She then installed Tomcat to C:\jakarta-tomcat-4.1.30.

However, when she runs catalina.sh start, she gets the following
error:

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
Using CATALINA_BASE: C:\jakarta-tomcat-4.1.30
Using CATALINA_HOME: C:\jakarta-tomcat-4.1.30
Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.1.30\temp
Using JAVA_HOME: C:\j2re1.4.2_08
'-Dsun.io.useCanonCaches' is not recognized as an internal or external
command,
operable program or batch file.

I've even tried adding the following to catalina.bat without success:

if not "%JAVA_HOME%" == "" goto gotJavaHome
set JAVA_HOME=C:\j2re1.4.2_08
:gotJavaHome


Can anyone see where we might be going wrong?

Cheers,

P.
 
Arnaud Berger





PostPosted: 2005-4-4 19:32:00 Top

java-programmer >> Tomcat on Windows: JAVA_HOME & -Dsun.io.useCanonCaches' Hi,

It seems to me that Tomcat requires a JDK not a JRE (I think because it may
use the javac compiler for JSPs at least).

The launcher script says :
JAVA_HOME Must point at your Java Development Kit installation.

So it really must be a JDK.

Regards,

Arnaud

"Paul Moloney" <email***@***.com> a 閏rit dans le message news:
email***@***.com...
> Apologies for posting this here, but I couldn't find any Tomcat user
> forum.
>
> A colleague is currently trying to run Tomcat 4.1.30 on Windows 2000
> Professional. She first installed JRE2 1.4.2_08, and set %JAVA_HOME%
> to the directory C:\j2re1.4.2_08 - I've run "java -version" and it
> works fine.
> (%JAVA_HOME%/home is in the path correctly).
>
> She then installed Tomcat to C:\jakarta-tomcat-4.1.30.
>
> However, when she runs catalina.sh start, she gets the following
> error:
>
> The JAVA_HOME environment variable is not defined correctly
> This environment variable is needed to run this program
> Using CATALINA_BASE: C:\jakarta-tomcat-4.1.30
> Using CATALINA_HOME: C:\jakarta-tomcat-4.1.30
> Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.1.30\temp
> Using JAVA_HOME: C:\j2re1.4.2_08
> '-Dsun.io.useCanonCaches' is not recognized as an internal or external
> command,
> operable program or batch file.
>
> I've even tried adding the following to catalina.bat without success:
>
> if not "%JAVA_HOME%" == "" goto gotJavaHome
> set JAVA_HOME=C:\j2re1.4.2_08
> :gotJavaHome
>
>
> Can anyone see where we might be going wrong?
>
> Cheers,
>
> P.