62,614
社区成员
发帖
与我相关
我的任务
分享
import java.io.InputStream;
import java.util.Scanner;
public class Test{
public static void main(String[] args)throws Exception{
Process process = Runtime.getRuntime().exec("java -version");
InputStream input = process.getErrorStream();
Scanner in = new Scanner(input);
while(in.hasNextLine()){
System.out.println(in.nextLine());
}
}
}