6 Replies Latest reply: Jan 8, 2010 12:12 PM by 843789 RSS

    contents in the .bat file is not getting executed.

    843789
      I am trying to run a java pgm using bat file.
      This .bat file is executed running a java pgm.
      .bat file is called but the content in .bat file is not getting executed.
      .bat file is located in C:\Program Files\apache-tomcat-6.0.16\bin

      .bat is called using following code
      Runtime rt = Runtime.getRuntime();   
             
                              String[] commands = new String[]{"cmd","/c","start","C:\\Program Files\\apache-tomcat-6.0.16\\bin\\a.bat"};   
                              Process pr = rt.exec(commands);   
                              int exitvalue = pr.exitValue();   
      Please help.
      Thanks in advance.