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

Java 无法从服务器计算机运行perl脚本,java,perl,Java,Perl,我无法从服务器上运行perl脚本。。上面是应用程序中提到的服务器ip(虚拟)。 请在这方面帮助我。。 提前感谢。您有权访问远程计算机吗?您能从终端运行这条线路吗: String name="perl http://10.107.97.201//C:/KATool/code/names.pl "; Process p = Runtime.getRuntime().exec(name); BufferedReader stdInput = new B

我无法从服务器上运行perl脚本。。上面是应用程序中提到的服务器ip(虚拟)。 请在这方面帮助我。。
提前感谢。

您有权访问远程计算机吗?您能从终端运行这条线路吗:

        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脚本本身已损坏,或者只是您无法(或失去)访问远程计算机。

perl处理的是文件系统,而不是internet协议,所以当您给perlhttp://...“就像你给记事本一样”http://...“,它不计算

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

Hi Samet…Ya我可以远程访问我的服务器,我也可以在我的服务器上运行脚本。。bt当我试图从我的客户机调用它时,它给出了一些“无法打开perl脚本”perl:无效参数“从客户机的终端运行perl脚本,并在此处发布错误消息。perl脚本的目的是按排序顺序显示名称。。。。这是从treminal运行后,客户端中names.pl的输出。。我可以在客户机中获取o/p。。bt从服务器机器访问时,我没有看到相同的输出。。而且我不知道。。它显示了一些不真实的错误信息。。这在客户机输出中的comentnames.pl中有说明:Mrs Smith Mr Jones Ms Samuel Dr Jansen Dr Black Dr Waymour Dr Jansen Sir Philipth这是调用perl脚本时收到的错误消息“无法打开perl脚本”perl 10.107.97.201//C:/KATool/code/names.pl”:嘿,Donk,我能够在我的定位计算机中非常完美地运行names.pl。而相同的names.pl在其他计算机上运行时(通过将我的本地计算机作为服务器运行到其他计算机),它无法打开perl脚本”perl 10.107.97.201//C:/KATool/code/names.pl:错误。。。
perl http://10.107.97.201//C:/KATool/code/names.pl