How to run Tomcat on Windows ?

Tom Zeller tzeller at dragonacea.biz
Thu Jul 28 09:34:38 EDT 2016


Maybe we should talk on a dev call, but see inline :

> On Jul 28, 2016, at 4:19 AM, Rod Widdowson <rdw at steadingsoftware.com> wrote:
> 
> Having written all the below I was suddenly struck: why you need to use
> either catalina.bat or tomcat.exe?  You are presumably using some other
> technology to start jetty.  Tomcat is just another java program so why can
> you not do the same thing there?

I am. For Jetty it’s calling “java -jar start.jar …” for Tomcat it’s “catalina.bat run”.

I was wondering if on Windows Tomcat should be “tomcat.exe <tbd>” instead.

> But you say that you are having problems killing catalina.bat (presumably
> from another command prompt?).  ISTR that this is a known weak point with
> Tomcat (others will confirm) and you might be best finding some tool to send
> a (metaphorical) SIGHUP to the java process.

FWIW I think in Java 9, Process comes with getPid() to do so (?), but not sure if that helps on Windows.

>> [And if the executable is preferred over the bat, I'm
>> wondering if setenv.bat is still called, because that's how I was
>> setting idp.home. ]
> 
> No, it isn't called: all the configuration is via the registry (a sort of
> system wide database for configuration of Windows applications, behaviour,
> drivers, and everything else).   Setting this up is what would allow us to
> run Jetty or Tomcat with the same executable.

Ah, that’s what I was after. It’s probably best to avoid using setenv.bat or setenv.sh to set idp.home.

Thx !
Tom



More information about the dev mailing list