title: Launching external console application from Java
body: <p>in a Java application I need to run an external console application. With the window's ones everything is OK:</p>
  
  <pre><code>try {
  System.out.println("Running...");
      Runtime.getRuntime().exec("notepad.exe");
      System.out.println("End.");
  }
  catch(Exception e) {
      System.out.println(e.getMessage());
  }
  </code></pre>
  
  <p>launches notepad successfully. </p>
  
  <p>But if I put <code>D:\\MyProg.exe</code> or <code>.bat</code> or even <code>cmd.exe</code> (which is it PATH as notepad is) it does not work. Without any exeptions. Just:</p>
  
  <pre><code>Running...
  End.
  </code></pre>