Fabien,

Since the "$@" is necessary to preserve quoting of arguments with spaces in
them, changing it to $@ is not a really good solution. First off, which Unix
platform are you using? I know that the "$@" works on Solaris and Linux and Mac
OS X.

Also, have you tried using "${@}"? Most platfroms don't require the curly braces
to preserve quoting, but maybe yours does.

Patrick

Fabien Nisol wrote:
> 
> Hello,
> 
> I noticed a bug in catalina.sh that make some of us have problem starting
> tomcat. The common error is that a message
> 
> usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [
> -debug ] [ -nonaming ] { start | stop }
> 
> is printed in $CATALINA_HOME/logs/catalina.out
> 
> I began to look at this problem and I finally found the bug:
> 
> The problem is that at every line where catalina is started ("$_RUNJAVA
> ..."), command line arguments that are passed to the catalina.sh script are
> passed using "$_RUNJAVA" <javaargs> <catalinaClass> "$@" <command> (quotes
> included) ... The problem : When only one argument is passed to the VM , in
> Catalina.main(String args[]), args are { "" , <command> } and not {
> <command> } ... ( starting catalina.sh start means starting "java
> <javaargs> <class> "" start", not "java <javaargs> <class> start") ...
> 
> big problem in Catalina.arguments(String[] args) where the argument ""
> (empty string) is not recognised and issues an error on stdout...
> 
> I think the problem could be corrected by replacing all "$@" (with quotes)
> occurence by $@ (without quotes) in catalina.sh
> 
> Are you ok with this or am I missing something??
> 
> Fabien Nisol
> java Developer/Analyst consultant
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

-- 
_____________________________________________________________________
Patrick Luby                          Email: [EMAIL PROTECTED]
Sun Microsystems                              Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_____________________________________________________________________

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to