commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Re: [cli] method to convert a string (which is a whole command line) into an array (of arguments)
Date Fri, 04 Apr 2008 23:09:54 GMT
I've had problems with that if I try to do something that contains
quotes.  I haven't tried it lately, though.

On Thu, Apr 3, 2008 at 12:32 PM, Roy Paterson <roy@smartbear.com> wrote:
> 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: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com]
> 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 <dtripp@mdisolutions.com>
> > 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: user-unsubscribe@commons.apache.org
> > >  For additional commands, e-mail: user-help@commons.apache.org
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
> >
> >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message