masayoshi.okutsu@Eng 1997-01-23
Sub-process can't be executed if specified executable name consists of
Japanese characters. Both Solaris and Windows failed.
To reproduce the problem, execure the following test program (includes
EUCJIS characters). Note that the path name specified by 'cmd' exists and
is executable.
import java.io.*;
public class exe{
public static void main(String[] arg){
try{
String cmd = "/home/sishida/bin/㳓›©ýmeow";
Runtime r = Runtime.getRuntime();
Process p = r.exec(cmd);
p.waitFor();
InputStream in = p.getErrorStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
System.out.println(br.readLine());
}catch(Exception e){
System.out.println(e.getMessage());
System.out.println("*** NG ***");
}
System.out.println("*** OK ***");
}
}
Result:
sishida@stones[69] java exe
/home/sishida/bin/?,^^meow: not found
*** NG ***
*** OK ***
- duplicates
-
JDK-4038319 Runtime.exec() can't pass environment variable in local code to child process
- Closed