You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David kerber <dc...@verizon.net> on 2013/03/18 15:59:27 UTC

Starting tomcat7w from batch file

Running TC 7.0.22 32-bit on windows server 2008 R2 Standard (64-bit).

I'm trying to start tomcat7w from a .cmd file to monitor the TC 
services, and can't seem to find the correct way of formatting the 
cmd-line parameters.

When I just copy the command line from the start menu shortcut, it tells 
me I have a bad parameter.  For example:

start "C:\Program Files (x86)\Apache Software Foundation\Tomcat 
7.0\bin\tomcat7w.exe" //MS//Small-55009

tells me "Invalid switch - "/".

Removing one of the leading slashes returns 'Invalid switch "/MS"'
I have tried it without the "start", and have tried removing one of the 
leading slashes.  I couldn't find anything in the TC online docs either.

What am I missing here?

D

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


RE: Starting tomcat7w from batch file

Posted by "Harris, Jeffrey E." <Je...@ManTech.com>.

> -----Original Message-----
> From: André Warnier [mailto:aw@ice-sa.com]
> Sent: Monday, March 18, 2013 12:04 PM
> To: Tomcat Users List
> Subject: Re: Starting tomcat7w from batch file
>
> Harris, Jeffrey E. wrote:
> >
> >> -----Original Message-----
> >> From: David kerber [mailto:dckerber@verizon.net]
> >> Sent: Monday, March 18, 2013 11:33 AM
> >> To: Tomcat Users List
> >> Subject: Re: Starting tomcat7w from batch file
> >>
> >>>>>>> tells me I have a bad parameter. For example:
> >>>>>>>
> >>>>>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
> >>>>>>> 7.0\bin\tomcat7w.exe" //MS//Small-55009
> >>>>>>>
> >>>>>>> tells me "Invalid switch - "/".
> >>>>>>>
> >>>>>>> Removing one of the leading slashes returns 'Invalid switch
> >> "/MS"'
> >>>>>>> I have tried it without the "start", and have tried removing
> one
> >>>>>>> of the leading slashes. I couldn't find anything in the TC
> >>>>>>> online docs either.
> >>>>>>>
> >>>>>>> What am I missing here?
> >>>>>>>
> >>>>>> Did you try :
> >>>>>>
> >>>>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
> >>>>>> 7.0\bin\tomcat7w.exe //MS//Small-55009"
> >>>>> Yes.  That doesn't throw an error, but doesn't start the monitor
> >>>>> either.
> >>>>>
> >>>>>> You might also try searching Google for "windows cmd quoting
> >> rules"
> >>>>>> And are you sure that it is tomcat7w.exe that must be started,
> >>>>>> not tomcat7.exe ?
> >>>>> Yes, it's the service monitor I'm trying to start, not the tomcat
> >>>>> server.
> >>>>>
> >>>> Next guess then : the "monitor" tomcat7w.exe is not itself a
> >> Service,
> >>>> it is just an application, no ? Doesn't "start" refer to Services
> >>>> only ?
> >>> Nope, it's a kind of "do it" program that allows you to launch
> >>> programs with/without a terminal, minimized, etc.
> >> Yeah, what he said.  In this usage, "Start" tells a windows batch
> >> file to start the specified program and continue on, rather than
> >> waiting for it to finish, as it would if you started it with "call"
> >> or with just the program name.  I'm trying to have a single batch
> >> file start the various tomcat7w instances for the TC services,
> rather
> >> than having to create a shortcut for each one and copy it into the
> startup group.
> >>
> >
> > start "" "D:\Tomcat 7.0\bin\tomcat7w.exe" //MS//Tomcat7
> >
> > See
> > http://stackoverflow.com/questions/154075/using-the-dos-start-
> command-
> > with-parameters-passed-to-the-started-program
> >
>
> Judging by that thread though, there appears to be as many different
> suggestions as people.. ;-) Windows's CMD shell has so many quirks in
> general, that it is really hard to figure out how it will handle a
> command-line.
> It`s almost worth installing a Windows bash port just to avoid it.
> Not that I've ever tried it though.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

I tested the solution above, and it worked for me.

Jeffrey Harris

This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments.

Re: Starting tomcat7w from batch file

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 3/18/13 12:03 PM, André Warnier wrote:
> Harris, Jeffrey E. wrote:
>> 
>> start "" "D:\Tomcat 7.0\bin\tomcat7w.exe" //MS//Tomcat7
>> 
>> See 
>> http://stackoverflow.com/questions/154075/using-the-dos-start-command-with-parameters-passed-to-the-started-program
>
>> 
> Judging by that thread though, there appears to be as many
> different suggestions as people.. ;-) Windows's CMD shell has so
> many quirks in general, that it is really hard to figure out how it
> will handle a command-line.

Windows CMD.EXE basically does not handle the command-line: each
program handles it by itself, which is why quotes don't always work, etc.

I remember long ago trying to find out how to process wildcards on the
command-line from a C program, and the Borland C compiler actually
came with a library that you would just link-in and it would handle
the wildcard expansion in command-line parameters. It's colossally
stupid to have all client programs handle their own command-line
expansion, but that's what CMD.EXE and its predecessor COMMAND.COM
required. I believe it's a relic of having to operate in a very small
amount of RAM: not every program needs complicated wildcard expansion,
command-line parsing, etc. so the shell was made to be as slim as
possible.

> It`s almost worth installing a Windows bash port just to avoid it. 
> Not that I've ever tried it though.

It wouldn't help in this case, because you'd probably still want to
use the "start" program to launch your stuff. Using cygwin and &'ing a
process just means that you have to leave the shell sitting around to
avoid killing it. I'm not sure how a program like "nohup" actually
works on Windows, so I'm not convinced there's a good way to solve
David's problem -- using the "" trick is as good as any hack.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlFId44ACgkQ9CaO5/Lv0PDPFwCeOms0gD2zfzfes+c2KTEtjWpM
rZIAoLjWPCm+M/ByS6saCdcQUfao06qe
=tZzP
-----END PGP SIGNATURE-----

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


Re: Starting tomcat7w from batch file

Posted by André Warnier <aw...@ice-sa.com>.
Harris, Jeffrey E. wrote:
> 
>> -----Original Message-----
>> From: David kerber [mailto:dckerber@verizon.net]
>> Sent: Monday, March 18, 2013 11:33 AM
>> To: Tomcat Users List
>> Subject: Re: Starting tomcat7w from batch file
>>
>>>>>>> tells me I have a bad parameter. For example:
>>>>>>>
>>>>>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>>>>>>> 7.0\bin\tomcat7w.exe" //MS//Small-55009
>>>>>>>
>>>>>>> tells me "Invalid switch - "/".
>>>>>>>
>>>>>>> Removing one of the leading slashes returns 'Invalid switch
>> "/MS"'
>>>>>>> I have tried it without the "start", and have tried removing one
>>>>>>> of the leading slashes. I couldn't find anything in the TC online
>>>>>>> docs either.
>>>>>>>
>>>>>>> What am I missing here?
>>>>>>>
>>>>>> Did you try :
>>>>>>
>>>>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>>>>>> 7.0\bin\tomcat7w.exe //MS//Small-55009"
>>>>> Yes.  That doesn't throw an error, but doesn't start the monitor
>>>>> either.
>>>>>
>>>>>> You might also try searching Google for "windows cmd quoting
>> rules"
>>>>>> And are you sure that it is tomcat7w.exe that must be started, not
>>>>>> tomcat7.exe ?
>>>>> Yes, it's the service monitor I'm trying to start, not the tomcat
>>>>> server.
>>>>>
>>>> Next guess then : the "monitor" tomcat7w.exe is not itself a
>> Service,
>>>> it is just an application, no ? Doesn't "start" refer to Services
>>>> only ?
>>> Nope, it's a kind of "do it" program that allows you to launch
>>> programs with/without a terminal, minimized, etc.
>> Yeah, what he said.  In this usage, "Start" tells a windows batch file
>> to start the specified program and continue on, rather than waiting for
>> it to finish, as it would if you started it with "call" or with just
>> the program name.  I'm trying to have a single batch file start the
>> various tomcat7w instances for the TC services, rather than having to
>> create a shortcut for each one and copy it into the startup group.
>>
> 
> start "" "D:\Tomcat 7.0\bin\tomcat7w.exe" //MS//Tomcat7
> 
> See http://stackoverflow.com/questions/154075/using-the-dos-start-command-with-parameters-passed-to-the-started-program
> 

Judging by that thread though, there appears to be as many different suggestions as 
people.. ;-)
Windows's CMD shell has so many quirks in general, that it is really hard to figure out 
how it will handle a command-line.
It`s almost worth installing a Windows bash port just to avoid it.
Not that I've ever tried it though.



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


Re: Starting tomcat7w from batch file

Posted by David kerber <dc...@verizon.net>.
On 3/18/2013 11:49 AM, Harris, Jeffrey E. wrote:
>
>
>> -----Original Message-----
>> From: David kerber [mailto:dckerber@verizon.net]
>> Sent: Monday, March 18, 2013 11:33 AM
>> To: Tomcat Users List
>> Subject: Re: Starting tomcat7w from batch file
>>
>>>>>>> tells me I have a bad parameter. For example:
>>>>>>>
>>>>>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>>>>>>> 7.0\bin\tomcat7w.exe" //MS//Small-55009
>>>>>>>
>>>>>>> tells me "Invalid switch - "/".
>>>>>>>
>>>>>>> Removing one of the leading slashes returns 'Invalid switch
>> "/MS"'
>>>>>>> I have tried it without the "start", and have tried removing one
>>>>>>> of the leading slashes. I couldn't find anything in the TC online
>>>>>>> docs either.
>>>>>>>
>>>>>>> What am I missing here?
>>>>>>>
>>>>>> Did you try :
>>>>>>
>>>>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>>>>>> 7.0\bin\tomcat7w.exe //MS//Small-55009"
>>>>>
>>>>> Yes.  That doesn't throw an error, but doesn't start the monitor
>>>>> either.
>>>>>
>>>>>>
>>>>>> You might also try searching Google for "windows cmd quoting
>> rules"
>>>>>>
>>>>>> And are you sure that it is tomcat7w.exe that must be started, not
>>>>>> tomcat7.exe ?
>>>>>
>>>>> Yes, it's the service monitor I'm trying to start, not the tomcat
>>>>> server.
>>>>>
>>>> Next guess then : the "monitor" tomcat7w.exe is not itself a
>> Service,
>>>> it is just an application, no ? Doesn't "start" refer to Services
>>>> only ?
>>>
>>> Nope, it's a kind of "do it" program that allows you to launch
>>> programs with/without a terminal, minimized, etc.
>>
>> Yeah, what he said.  In this usage, "Start" tells a windows batch file
>> to start the specified program and continue on, rather than waiting for
>> it to finish, as it would if you started it with "call" or with just
>> the program name.  I'm trying to have a single batch file start the
>> various tomcat7w instances for the TC services, rather than having to
>> create a shortcut for each one and copy it into the startup group.
>>
>
> start "" "D:\Tomcat 7.0\bin\tomcat7w.exe" //MS//Tomcat7
>
> See http://stackoverflow.com/questions/154075/using-the-dos-start-command-with-parameters-passed-to-the-started-program

That did the trick; thanks, people!

D

>
> Jeffrey Harris
>
> This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


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


RE: Starting tomcat7w from batch file

Posted by "Harris, Jeffrey E." <Je...@ManTech.com>.

> -----Original Message-----
> From: David kerber [mailto:dckerber@verizon.net]
> Sent: Monday, March 18, 2013 11:33 AM
> To: Tomcat Users List
> Subject: Re: Starting tomcat7w from batch file
>
> >>>>> tells me I have a bad parameter. For example:
> >>>>>
> >>>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
> >>>>> 7.0\bin\tomcat7w.exe" //MS//Small-55009
> >>>>>
> >>>>> tells me "Invalid switch - "/".
> >>>>>
> >>>>> Removing one of the leading slashes returns 'Invalid switch
> "/MS"'
> >>>>> I have tried it without the "start", and have tried removing one
> >>>>> of the leading slashes. I couldn't find anything in the TC online
> >>>>> docs either.
> >>>>>
> >>>>> What am I missing here?
> >>>>>
> >>>> Did you try :
> >>>>
> >>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
> >>>> 7.0\bin\tomcat7w.exe //MS//Small-55009"
> >>>
> >>> Yes.  That doesn't throw an error, but doesn't start the monitor
> >>> either.
> >>>
> >>>>
> >>>> You might also try searching Google for "windows cmd quoting
> rules"
> >>>>
> >>>> And are you sure that it is tomcat7w.exe that must be started, not
> >>>> tomcat7.exe ?
> >>>
> >>> Yes, it's the service monitor I'm trying to start, not the tomcat
> >>> server.
> >>>
> >> Next guess then : the "monitor" tomcat7w.exe is not itself a
> Service,
> >> it is just an application, no ? Doesn't "start" refer to Services
> >> only ?
> >
> > Nope, it's a kind of "do it" program that allows you to launch
> > programs with/without a terminal, minimized, etc.
>
> Yeah, what he said.  In this usage, "Start" tells a windows batch file
> to start the specified program and continue on, rather than waiting for
> it to finish, as it would if you started it with "call" or with just
> the program name.  I'm trying to have a single batch file start the
> various tomcat7w instances for the TC services, rather than having to
> create a shortcut for each one and copy it into the startup group.
>

start "" "D:\Tomcat 7.0\bin\tomcat7w.exe" //MS//Tomcat7

See http://stackoverflow.com/questions/154075/using-the-dos-start-command-with-parameters-passed-to-the-started-program

Jeffrey Harris

This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments.

Re: Starting tomcat7w from batch file

Posted by David kerber <dc...@verizon.net>.
On 3/18/2013 11:28 AM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> André,
>
> On 3/18/13 11:21 AM, André Warnier wrote:
>> David kerber wrote:
>>> On 3/18/2013 11:08 AM, André Warnier wrote:
>>>> David kerber wrote:
>>>>> Running TC 7.0.22 32-bit on windows server 2008 R2 Standard
>>>>> (64-bit).
>>>>>
>>>>> I'm trying to start tomcat7w from a .cmd file to monitor the
>>>>> TC services, and can't seem to find the correct way of
>>>>> formatting the cmd-line parameters.
>>>>>
>>>>> When I just copy the command line from the start menu
>>>>> shortcut, it tells me I have a bad parameter. For example:
>>>>>
>>>>> start "C:\Program Files (x86)\Apache Software
>>>>> Foundation\Tomcat 7.0\bin\tomcat7w.exe" //MS//Small-55009
>>>>>
>>>>> tells me "Invalid switch - "/".
>>>>>
>>>>> Removing one of the leading slashes returns 'Invalid switch
>>>>> "/MS"' I have tried it without the "start", and have tried
>>>>> removing one of the leading slashes. I couldn't find anything
>>>>> in the TC online docs either.
>>>>>
>>>>> What am I missing here?
>>>>>
>>>> Did you try :
>>>>
>>>> start "C:\Program Files (x86)\Apache Software
>>>> Foundation\Tomcat 7.0\bin\tomcat7w.exe //MS//Small-55009"
>>>
>>> Yes.  That doesn't throw an error, but doesn't start the monitor
>>> either.
>>>
>>>>
>>>> You might also try searching Google for "windows cmd quoting
>>>> rules"
>>>>
>>>> And are you sure that it is tomcat7w.exe that must be started,
>>>> not tomcat7.exe ?
>>>
>>> Yes, it's the service monitor I'm trying to start, not the tomcat
>>> server.
>>>
>> Next guess then : the "monitor" tomcat7w.exe is not itself a
>> Service, it is just an application, no ? Doesn't "start" refer to
>> Services only ?
>
> Nope, it's a kind of "do it" program that allows you to launch
> programs with/without a terminal, minimized, etc.

Yeah, what he said.  In this usage, "Start" tells a windows batch file 
to start the specified program and continue on, rather than waiting for 
it to finish, as it would if you started it with "call" or with just the 
program name.  I'm trying to have a single batch file start the various 
tomcat7w instances for the TC services, rather than having to create a 
shortcut for each one and copy it into the startup group.

You're thinking of the "net start..." command, which does start a service.

D


>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEAREIAAYFAlFHMpwACgkQ9CaO5/Lv0PBYYwCbBUzF1a8Ye+suIUcHFAbm6G2E
> E50AoLmUYgd64mfEZPkb9riWOqfrNAv7
> =hVCK
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


Re: Starting tomcat7w from batch file

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 3/18/13 11:21 AM, André Warnier wrote:
> David kerber wrote:
>> On 3/18/2013 11:08 AM, André Warnier wrote:
>>> David kerber wrote:
>>>> Running TC 7.0.22 32-bit on windows server 2008 R2 Standard
>>>> (64-bit).
>>>> 
>>>> I'm trying to start tomcat7w from a .cmd file to monitor the
>>>> TC services, and can't seem to find the correct way of
>>>> formatting the cmd-line parameters.
>>>> 
>>>> When I just copy the command line from the start menu
>>>> shortcut, it tells me I have a bad parameter. For example:
>>>> 
>>>> start "C:\Program Files (x86)\Apache Software
>>>> Foundation\Tomcat 7.0\bin\tomcat7w.exe" //MS//Small-55009
>>>> 
>>>> tells me "Invalid switch - "/".
>>>> 
>>>> Removing one of the leading slashes returns 'Invalid switch
>>>> "/MS"' I have tried it without the "start", and have tried
>>>> removing one of the leading slashes. I couldn't find anything
>>>> in the TC online docs either.
>>>> 
>>>> What am I missing here?
>>>> 
>>> Did you try :
>>> 
>>> start "C:\Program Files (x86)\Apache Software
>>> Foundation\Tomcat 7.0\bin\tomcat7w.exe //MS//Small-55009"
>> 
>> Yes.  That doesn't throw an error, but doesn't start the monitor
>> either.
>> 
>>> 
>>> You might also try searching Google for "windows cmd quoting
>>> rules"
>>> 
>>> And are you sure that it is tomcat7w.exe that must be started,
>>> not tomcat7.exe ?
>> 
>> Yes, it's the service monitor I'm trying to start, not the tomcat
>> server.
>> 
> Next guess then : the "monitor" tomcat7w.exe is not itself a
> Service, it is just an application, no ? Doesn't "start" refer to
> Services only ?

Nope, it's a kind of "do it" program that allows you to launch
programs with/without a terminal, minimized, etc.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlFHMpwACgkQ9CaO5/Lv0PBYYwCbBUzF1a8Ye+suIUcHFAbm6G2E
E50AoLmUYgd64mfEZPkb9riWOqfrNAv7
=hVCK
-----END PGP SIGNATURE-----

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


Re: Starting tomcat7w from batch file

Posted by André Warnier <aw...@ice-sa.com>.
David kerber wrote:
> On 3/18/2013 11:08 AM, André Warnier wrote:
>> David kerber wrote:
>>> Running TC 7.0.22 32-bit on windows server 2008 R2 Standard (64-bit).
>>>
>>> I'm trying to start tomcat7w from a .cmd file to monitor the TC
>>> services, and can't seem to find the correct way of formatting the
>>> cmd-line parameters.
>>>
>>> When I just copy the command line from the start menu shortcut, it
>>> tells me I have a bad parameter. For example:
>>>
>>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>>> 7.0\bin\tomcat7w.exe" //MS//Small-55009
>>>
>>> tells me "Invalid switch - "/".
>>>
>>> Removing one of the leading slashes returns 'Invalid switch "/MS"'
>>> I have tried it without the "start", and have tried removing one of
>>> the leading slashes. I couldn't find anything in the TC online docs
>>> either.
>>>
>>> What am I missing here?
>>>
>> Did you try :
>>
>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>> 7.0\bin\tomcat7w.exe //MS//Small-55009"
> 
> Yes.  That doesn't throw an error, but doesn't start the monitor either.
> 
>>
>> You might also try searching Google for "windows cmd quoting rules"
>>
>> And are you sure that it is tomcat7w.exe that must be started, not
>> tomcat7.exe ?
> 
> Yes, it's the service monitor I'm trying to start, not the tomcat server.
> 
Next guess then : the "monitor" tomcat7w.exe is not itself a Service, it is just an 
application, no ?
Doesn't "start" refer to Services only ?


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


Re: Starting tomcat7w from batch file

Posted by David kerber <dc...@verizon.net>.
On 3/18/2013 11:08 AM, André Warnier wrote:
> David kerber wrote:
>> Running TC 7.0.22 32-bit on windows server 2008 R2 Standard (64-bit).
>>
>> I'm trying to start tomcat7w from a .cmd file to monitor the TC
>> services, and can't seem to find the correct way of formatting the
>> cmd-line parameters.
>>
>> When I just copy the command line from the start menu shortcut, it
>> tells me I have a bad parameter. For example:
>>
>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>> 7.0\bin\tomcat7w.exe" //MS//Small-55009
>>
>> tells me "Invalid switch - "/".
>>
>> Removing one of the leading slashes returns 'Invalid switch "/MS"'
>> I have tried it without the "start", and have tried removing one of
>> the leading slashes. I couldn't find anything in the TC online docs
>> either.
>>
>> What am I missing here?
>>
> Did you try :
>
> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
> 7.0\bin\tomcat7w.exe //MS//Small-55009"

Yes.  That doesn't throw an error, but doesn't start the monitor either.

>
> You might also try searching Google for "windows cmd quoting rules"
>
> And are you sure that it is tomcat7w.exe that must be started, not
> tomcat7.exe ?

Yes, it's the service monitor I'm trying to start, not the tomcat server.


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


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


Re: Starting tomcat7w from batch file

Posted by André Warnier <aw...@ice-sa.com>.
David kerber wrote:
> Running TC 7.0.22 32-bit on windows server 2008 R2 Standard (64-bit).
> 
> I'm trying to start tomcat7w from a .cmd file to monitor the TC 
> services, and can't seem to find the correct way of formatting the 
> cmd-line parameters.
> 
> When I just copy the command line from the start menu shortcut, it tells 
> me I have a bad parameter.  For example:
> 
> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat 
> 7.0\bin\tomcat7w.exe" //MS//Small-55009
> 
> tells me "Invalid switch - "/".
> 
> Removing one of the leading slashes returns 'Invalid switch "/MS"'
> I have tried it without the "start", and have tried removing one of the 
> leading slashes.  I couldn't find anything in the TC online docs either.
> 
> What am I missing here?
> 
Did you try :

start "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin\tomcat7w.exe 
//MS//Small-55009"

You might also try searching Google for "windows cmd quoting rules"

And are you sure that it is tomcat7w.exe that must be started, not tomcat7.exe ?


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


Re: Starting tomcat7w from batch file

Posted by David kerber <dc...@verizon.net>.
On 3/19/2013 2:04 AM, Mladen Turk wrote:
> On 03/18/2013 03:59 PM, David kerber wrote:
>> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat
>> 7.0\bin\tomcat7w.exe" //MS//Small-55009
>>
>
> You can also copy/rename tomcat7w.exe to small-55009w.exe and you won't
> need any params.

Hmmm.  I had forgotten about that option.  That would be easy to fit 
into my initial configuration script too...

Thanks for the suggestion!


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


Re: Starting tomcat7w from batch file

Posted by Mladen Turk <mt...@apache.org>.
On 03/18/2013 03:59 PM, David kerber wrote:
> start "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin\tomcat7w.exe" //MS//Small-55009
>

You can also copy/rename tomcat7w.exe to small-55009w.exe and you won't need any params.


Regards
-- 
^TM

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