Question about Runtime.getRuntime().exec()
Hi,
I run the following problem on Linux with java 1.4.2_11.
"/home/yinglcs/myprogram" is a native program which generate a file locally.
however, the files does not generate until I exit my Java Program (which calls "/home/yinglcs/myprogram" using getRuntime().exec()).
can someone please tell me why? How can I change that, I don't want the file io of my native program until AFTER my java program exists.
String envp[] = new String[4];
envp[0] = "LD_LIBRARY_PATH=" + LD_LIBRARY_PATH;
envp[3] = "DISPLAY=:0";
envp[2] = "HOME=" + HOME_DIRECTORY;
envp[1] = "SHELL=/bin/bash";
String cmd = "/home/yinglcs/myprogram";
System.err.println ("cmd" + cmd);
Process p = Runtime.getRuntime().exec( cmd, envp );
Thank you for any help.

