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