File abc = new File("D:\\sjhk\\zipDir");
System.out.println(abc.getPath());
String SourcePath="c:\\";
             String toPath="D:\\";
    String Filename="abc123";
    String rarPath="WinRAR.exe";
    String cmd=rarPath+" x -ibck -y " + SourcePath +"\\"+  Filename + " "+toPath;
    Runtime.getRuntime().exec(cmd);
        Process proc;
        proc = Runtime.getRuntime().exec(cmd);
        
          if (proc.waitFor() != 0) {
            System.err.println("exit value = " +
                               proc.exitValue());
          } 
上段代码使用java调用可以正确执行,但是写到tomcat中就不行了,程序异常终止,是不是tomcat有什么安全限制,不能执行外部程序啊,怎么能让tomcat执行。