title: How to run exe file in Java program
body: <p>How can a <code>exe</code> file be executed in Java code in NetBeans?
  I write a code to run a exe file in Java,</p>
  
  <pre><code>  Process process = Runtime.getRuntime().exec( "cmd.exe /C start C:/Users/123/Desktop/nlp.exe" ); 
  </code></pre>
  
  <p>This code runs the file.</p>
  
  <p>This file have some section that I can click it and run different part of it.
  Is it possible that I can use a code to access to that sections and run them in Java instead of clicking it? </p>
  
  <p>edited code :</p>
  
  <pre><code> Process process = Runtime.getRuntime().exec( "cmd.exe /C start C:/Users/123/Desktop/nlp.exe" ); 
  
  Robot bot = new Robot();
  bot.mouseMove(100, 100);    
  bot.mousePress(InputEvent.BUTTON1_MASK);
  bot.mouseRelease(InputEvent.BUTTON1_MASK);
  </code></pre>