That's what I would suggest. You may have to doctor it a bit as well; for instance: rt.exec( new String[]{ "webcopy", "\"f1.html f2.html\"" } ); (notice the escaped double quotes surrounding the second string). Note that the docs say that exec( String ) uses a StringTokenizer to break things up into tokens, and recall that StringTokenizer just uses a non-context-sensitive search for token delimiters (whitespace). That's why the other one wasn't working. Bill --- Mike Bresnahan <mike at fruitioninc.com> wrote: > Use one of the other exec() signatures. For example, try this one: > > public Process exec(String[] cmdarray) throws IOException > > Mike Bresnahan > > ----- Original Message ----- > From: "Perry Hoekstra" <dutchman at uswest.net> > To: "tclug-devel" <tclug-devel at mn-linux.org> > Sent: Wednesday, July 25, 2001 7:53 AM > Subject: [TCLUG-DEVEL] Calling a shell script from a Java program > > > > Hello all, > > > > I have a question concerning calling a shell script from Java > through > > the exec method. My problem is passing multiple values as a single > > > variable. Example > > > > Process t_process = t_runtime.exec("webcopy 'file1.html > file2.html'"); > > > > I want both files sent through to the $1 arg in my webcopy shell > script. > > However, when webcopy is invoked, file1.html is passed through > the $1 > > arg and file2.html is passed in the $2 arg because of the space. I > have > > tried both single and double quotes. Is there any way to pass a > space > > delimited string as a single arguement? > > > > -- > > Perry Hoekstra > > E-Commerce Architect > > Talent Software Services > > perry.hoekstra at talentemail.com > > > > _______________________________________________ > > tclug-devel mailing list > > tclug-devel at mn-linux.org > > https://mailman.mn-linux.org/mailman/listinfo/tclug-devel > > _______________________________________________ > tclug-devel mailing list > tclug-devel at mn-linux.org > https://mailman.mn-linux.org/mailman/listinfo/tclug-devel __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/