-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.1.1
-
sparc
-
solaris_2.6
(Solaris2.6 beta Refresh II, JDK1.1.1)
Following routine does not work if cmd has 'more file'.
If cmd has 'cat file', it works fine. It seems exec() or io problem.
public static void system(String cmd)
{
try{
Process cp = Runtime.getRuntime().exec(cmd);
BufferedReader br = new BufferedReader(
new InputStreamReader(cp.getInputStream()));
String line = null;
while ((line = br.readLine()) != null)
System.out.println(line);
}
catch (Throwable e) {
}
}
Following routine does not work if cmd has 'more file'.
If cmd has 'cat file', it works fine. It seems exec() or io problem.
public static void system(String cmd)
{
try{
Process cp = Runtime.getRuntime().exec(cmd);
BufferedReader br = new BufferedReader(
new InputStreamReader(cp.getInputStream()));
String line = null;
while ((line = br.readLine()) != null)
System.out.println(line);
}
catch (Throwable e) {
}
}