Runtime.exec with envp parameter . . .

Tim Panton - Westhawk Ltd tpanton at ibm.net
Sat Nov 12 19:29:10 PST 2005


We worked around this by 
constructing an exec call that 
did the following (from memory):
String [] args[]={"/bin/sh","-c",
	"DISPLAY=blah:0.0 myprog -x"};
	r.exec(args);

this just adds the DISPLAY variable
to the program's env.

The trick is to avoid exec(String)
and use the array varient, since
this lets you control the argument
seperation.



Tony Izzo <tizzo at yahoo.com> wrote:
__________
 >My task is to launch a shell script on Solaris,
>while specifiying the value of the DISPLAY environment variable for the
>environmnet that will run the script. ---
URL http://www.westhawk.co.uk/

---
To unsubscribe, mail advanced-java-unsubscribe at xcf.berkeley.edu
To get help, mail advanced-java-help at xcf.berkeley.edu



More information about the Advanced-java mailing list