tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: Windows batch files for Tomcat 3.2
Date Sun, 03 Sep 2000 19:46:15 GMT
I wouldn't have expected this to be different from between Win98 and Win98SE.  Does the "if
exits..." that tests for spaces cause the problem, or does the "for..." not work, even with
no spaces in TOMCAT_HOME?

Did you say in an earlier e-mail that the "for..." worked with "." as TOMCAT_HOME.  If so,
I could still allow the dynamic classpath for TOMCAT_HOME="." or maybe "..".  It would be
nice not to give up the
dynamic CLASSPATH completely for Win9x systems.

It is possible I have stared at tomcat.bat too long, but it seems to me that even when the
CLASSPATH is set, execution still passes through the command that adds tools.jar.

I'll go ahead and add the test for existence that Sam mentioned in a different e-mail.

Larry


-----Original Message-----
From: Hans Bergsten
To: tomcat-dev@jakarta.apache.org
Sent: 9/3/00 2:12 PM
Subject: Re: Windows batch files for Tomcat 3.2

> Larry Isaacs wrote:
> 
> Attached is a proposed set of Windows batch files for Tomcat 3.2.
> [...]
> This set works for me on Win98SE and NT 4.0.  Let me know if problems
are
> found on Win95 or Win2000.

Thanks, this looks much better. But a minor modification is needed to
get it to work on Windows 98 (at least the unpatched version I run):

rem ----- Set Up The Runtime Classpath
--------------------------------------

:setClasspath
set CP=%TOMCAT_HOME%\classes

rem Try to determine if TOMCAT_HOME contains spaces
if exist %TOMCAT_HOME%\lib\webserver.jar goto testOS
echo Your TOMCAT_HOME appears to contain spaces
echo Unable to set CLASSPATH dynamically
goto staticClasspath

:testOS
rem Dynamic CLASSPATH doesn't work on Windows 95/98
if not "%OS%" == "Windows_NT" goto staticClasspath

:dynClasspath
[...]

The only thing I've changed is a test on the OS to only go to
dynClasspath if it's NT. Since the %OS% variable is not initialized on
Windows 98, I didn't see a better way even though I realize this may
force a static CLASSPATH on more platforms than really needed.

I also believe the last part of the CLASSPATH setting should be changed
to this:

:chkClasspath
if "%CLASSPATH%" == "" goto noClasspath
set CP=%CP%;%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
:noClasspath
set CP=%CP%;%JAVA_HOME%\lib\tools.jar

What I have changed here is to add ";%JAVA_HOME%\lib\tools.jar" even if
the CLASSPATH is set.

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

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

Mime
View raw message