tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Luby <patrick.l...@sun.com>
Subject Re: [5] launcher/deamon
Date Tue, 06 Aug 2002 23:28:25 GMT
Kevin Jones wrote:
> 
> I think you may be confused here between the old DOS command prompt and
> the real shell that comes with Windows NT/Windows 2K and Windows XP.
> These all have similar functionality to bash with regards to 2> and 2>>

You are right. That is because most of my pain with batch files comes
from Windows 95, 98, and ME which use the old command.com. Windows 2000,
NT, and XP don't really have many problems with batch shells. See my
additional Window 95, 98, and ME problems later in this e-mail.

> 
> With 'start' it depends what you're starting. If you start a windows app
> then there is no cmd shell hanging around. If you start a console app,
> you get the console for that app, with no extra command shell. Isn't
> this what bash does with & ?
> 
> > My goal was to get rid of unnecessary DOS windows for non-console
> > applications. "start" does not do this.
> 
> Yes it does, try it.
>

Good point. I use javaw.exe for shortcuts in the Windows Start->Programs
menu. Then, we can have the application's main() method do the
redirection of output to a file. I sometimes forget that we can move
some of the stuff that is handled by the script into the Java code
itself.

> 
> For example I use an IDE called IDEA under WinXP. This has a batch file
> to start the IDE. By default the batch file calls java with a bunch of
> parameters and leaves a console window lying around. I've modified the
> batch file to 'start javaw' with a bunch of parameters, now I have no
> extra windows,

You can even invoke javaw.exe without start and the console prompt will
return.

But one problem still remains: I cannot trust %0 on Windows 95, 98, and
ME and, hence, need to use a bootstrap class to construct all of the
path related stuff that would normally be relative to %0. Also, those 3
Windows platforms cannot perform "for" loops on paths with spaces.

In essence, the gist of the problem is how can I get Windows 2000, NT,
and XP behavior out of Windows 95, 98, and ME (at least as far as %0 and
"for" loops are concerned)? The only method that I have found so far is
to move most everything in the batch script into Java code. This
approach doesn't bother me as it makes it easier to get the same runtime
behavior whether you execute a batch script, invoke javaw.exe from a
shortcut, or double click on a jar file (granted, the batch script needs
the bootstrap class to classload the jar file with the real main() but
that is a minor detail).

Of course, maybe I am obsessing way too much about support for Windows
95, 98, and ME.

Patrick

-- 
_____________________________________________________________________
Patrick Luby                          Email: patrick.luby@sun.com
Sun Microsystems                              Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_____________________________________________________________________

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message