On Thu, Aug 21, 2014 at 9:40 PM, David Kerber <dcker...@verizon.net> wrote:

> On 8/21/2014 6:18 PM, André Warnier wrote:
>>
>> Now all that's left to do is for someone to make a version of this that
>> works for installing and starting the same as Windows Services.
>>
>> Despite what Christopher wrote - which is basically right - there is
>> still some tricky element there, in that you cannot set the
>> "system-wide" environment variables JAVA_HOME, CATALINA_HOME and
>> CATALINA_BASE.  If you do, then each of the respective (tomcat6,
>> tomcat7, tomcat8) "service.bat" will use the set values, and never
>> prompt for another.
>> I have not actually tested this scenario, but looking at the code of the
>> "service.bat" file, I believe that in case you install multiple Tomcat
>> services, there is a potential for misbehaving there (for example, it
>> requires JAVA_HOME to be set, but which one ?).
>>
>
> I think the intent of the instructions was to allow you to run any of
> them, but start them at different times, changing the environment variables
> as appropriate before starting each one.  Once an instance is started, I
> believe it's safe to change the env var's to start the next one.
>
>
André and David,

I wanted to exactly avoid installing Tomcat as a Windows service. My
(assumed) goal was to have operational Tomcat instances that I can
start/stop at will. I also tried to avoid setting any of the environment
variables (CATALINA_HOME, CATALINA_BASE, JAVA_HOME, PATH) globally or for
the running "shell" (command prompt window) - but rather scope it to the
execution of the particular startup script.

The context of this setup was - a development machine, and testing my
application with various Tomcat+JDK version combinations.

I would probably structure my setup differently, if the context was an
operational machine (production, staging, testing, etc...) with
multi-instance setup. If anyone is interested, we could write up this setup
as well, and as Chuck suggested, post it to the Tomcat Wiki.

Cheers!
Neven

Reply via email to