这是我用java写的 在windows系统下执行的命令,如何在linux系统下 执行这样的命令呢?括号里 应该如何写
源码:path1代表D:\\Tomcat6_dl\\bin。 path2代表D:\\Tomcat6_dl\\bin\\catalina.bat。str代表stop/start
public void ControlWindowsTomcat(String Path1,String Path2,String str){
Runtime runtime = Runtime.getRuntime();
try {
Process process = runtime.exec("cmd /C "+Path2+" "+str,null,new File(Path1));
System.out.println(str+"--TomcatStart()-");
System.out.println(Path1+"--TomcatStart()-");
System.out.println(Path2+"--TomcatStart()-");
BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
String s;
            boolean restart = false;
            while ((s = in.readLine()) != null) {
                    restart = true;
                    break;
            }
            System.out.println("<" + new Date() + "> Tomcat is "+str+" "
                    + (restart ? "OK" : "ERROR"));
} catch (IOException e) {
 
e.printStackTrace();
}
}tomcatlinuxcmdpathstring