If you're doing that, just use the single-string version of
Runtime.exec() and let Java figure out how to parse it appropriately for
your OS.
I do that in my product - works fine on Unix, Window, MacOS.
Roy
Daniel Tripp wrote:
Well, pass it to Runtime.exec(), yes.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of James Carman
Sent: April 3, 2008 10:42 AM
To: Jakarta Commons Users List
Subject: Re: [cli] method to convert a string (which is a whole command
line) into an array (of arguments)
So, are you looking to have your user enter a command line and then you're
going to split it yourself and pass that to a static main(String[] args)
method?
On Thu, Apr 3, 2008 at 11:38 AM, Daniel Tripp <[EMAIL PROTECTED]>
wrote:
Which OS(es) are you targetting?
Various Windowses, various *nixes.
> So are you looking to emulate that?
Right.
> In which case, perhaps the Harmony project has some code that will
do what you want.
I can't see anything in Harmony that does this, because Harmony just
implements the standard java.* etc. classes, correct?
Environment variables are another consideration, yes.
Really I was expecting other people to have run into this same
problem too, and hoping they would chime in. I guess not.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]