gpt4 book ai didi

java - 无法从服务器计算机运行 perl 脚本

转载 作者:行者123 更新时间:2023-12-02 08:05:55 25 4
gpt4 key购买 nike

        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(虚拟)。请帮助我。提前致谢..

最佳答案

perl 处理文件系统,而不是互联网协议(protocol),所以当你给 perl “http://...” 就像你给记事本“http://...”一样,它确实如此不计算

因此要在本地运行names.pl,首先您必须下载它(wget ...),然后运行它

关于java - 无法从服务器计算机运行 perl 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8179854/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com