title: java runtime.exec() not working on tomcat
body: <p><code>Runtime.exec()</code> not working on tomcat.</p>
  
  <p>I have a problem in running a command from java web application. I used <code>runtime.exec()</code>. It's working fine at eclipse. But not working at all after deployed on tomcat. I think that <code>runtime.exec()</code> not working at all. Any idea?</p>
  
  <p>I written at server side. I want to create a windows schedule task from runtime. Here is my code.</p>
  
  <pre><code>String l_Time = pData.getTimeStamp();
  ProcessBuilder builder = new ProcessBuilder("cmd", "/c", "start  SchTasks /Create " +
                  "/SC WEEKLY /D MON,TUE,WED,THU,FRI,SAT,SUN /TN \"TaskName\"" +
                  " /TR \"D:/Test/Test.bat\" /ST 09:00\"");
  builder.redirectErrorStream(true);
  Process p = builder.start();
  
  BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
  String line;
  while (true) {
      line = r.readLine();
      if (line == null) { break; }
          System.out.println(line);
  }
  p.waitFor();
  int exitVal = p.exitValue();
  System.out.println("Process exitValue: " + exitVal);
  </code></pre>