String name="perl http://10.107.97.201//C:/KATool/code/names.pl ";
Process p = Runtime.getRuntime().exec(name);
BufferedReader stdInput = new BufferedReader(new
InputStreamReader(p.getInputStream()));
BufferedReader stdError = new BufferedReader(new
InputStreamReader(p.getErrorStream()));
// read the output from the command
System.out.println("Here is the standard output of the command:\n");
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
}我无法从服务器计算机运行perl脚本。上面是应用程序中提到的服务器ip(虚拟)。在这件事上请帮帮我。提前谢谢你..
发布于 2011-11-18 17:01:01
您是否有权访问远程计算机?你能从你的终端运行这行代码吗:
perl http://10.107.97.201//C:/KATool/code/names.pl在您的终端中运行此命令,并调查您收到的错误消息。也许perl脚本本身就是损坏的,或者只是您没有(或丢失)对远程计算机的访问权限。
https://stackoverflow.com/questions/8179854
复制相似问题