You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Larry Isaacs <la...@mindspring.com> on 2000/09/02 22:46:23 UTC

Windows batch files for Tomcat 3.2

Attached is a proposed set of Windows batch files for Tomcat 3.2.

They implement the following features:

1) JAVA_HOME may contain spaces.
2) "%JAVA_HOME%\bin\java" is used as executable (Bug# 43 from Jim Cook)
3) TOMCAT_HOME may contain spaces
4) If TOMCAT_HOME doesn't contain spaces, CLASSPATH is set dynamically.
5) If TOMCAT_HOME contains spaces, a message is displayed and CLASSPATH is set statically.
6) On NT, a title is displayed on taskbar button (This is actually required by #2 above.)

This set works for me on Win98SE and NT 4.0.  Let me know if problems are found on Win95 or Win2000.

Sam, if these look okay to you, let me know and I'll commit them.  Otherwise I'll wait for feedback.

Cheers,
Larry

Re: Windows batch files for Tomcat 3.2

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
> 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

RE: Windows batch files for Tomcat 3.2

Posted by Rob Clevenger <ro...@robsite.org>.
Works on Windows ME.

Rob

-----Original Message-----
From: Larry Isaacs [mailto:larryisaacs@mindspring.com]
Sent: Saturday, September 02, 2000 1:46 PM
To: tomcat-dev@jakarta.apache.org
Subject: Windows batch files for Tomcat 3.2


Attached is a proposed set of Windows batch files for Tomcat 3.2.

They implement the following features:

1) JAVA_HOME may contain spaces.
2) "%JAVA_HOME%\bin\java" is used as executable (Bug# 43 from Jim Cook)
3) TOMCAT_HOME may contain spaces
4) If TOMCAT_HOME doesn't contain spaces, CLASSPATH is set dynamically.
5) If TOMCAT_HOME contains spaces, a message is displayed and CLASSPATH is
set statically.
6) On NT, a title is displayed on taskbar button (This is actually required
by #2 above.)

This set works for me on Win98SE and NT 4.0.  Let me know if problems are
found on Win95 or Win2000.

Sam, if these look okay to you, let me know and I'll commit them.  Otherwise
I'll wait for feedback.

Cheers,
Larry