title: Launch process (file) within from a .jar script
body: <p>I'm currently trying to figure out how I could for example run a file/app which is located on my desktop. 
  In this case, to test everything, I created a batch file called <em>test.bat</em> and inside there is the command:</p>
  
  <pre><code>@echo
  msg * hello
  </code></pre>
  
  <p>Which will pop-up a message box.</p>
  
  <p>This should be launched within Netbeans with a jButton, so this is what I currently have:</p>
  
  <pre><code>private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
  
              // TODO add your handling code here:
  
          Runtime rt = Runtime.getRuntime();
          Process pr = rt.exec("msg * hello");
  
  
      }
  </code></pre>
  
  <p>However every time I hit that button, nothing happens.</p>
  
  <p>In addition, I read several posts here on stackoverflow, but still cant figure out what I'm doing wrong, since I get an error message by adding those lines
              Runtime rt = Runtime.getRuntime();
              Process pr = rt.exec("start test.bat");</p>
  
  <p>for this line:</p>
  
  <pre><code>Process pr = rt.exec("start test.bat");
  </code></pre>
  
  <p>Which says:</p>
  
  <blockquote>
    <p>unreported exception IOException; must be caught or declared to be
    thrown</p>
  </blockquote>
  
  <p>How can I launch (maybe otherwise) the test.bat file by pushing the button?</p>
  
  <p>And I have read other posts but none of them are talking about this IOExceptions.</p>
  
  <p>AGAIN! there is now solution yet, which i have found for this error, so stop marking this post as a duplication....</p>
  
  <p>This is what i got with the try catch, its working now.</p>
  
  <pre><code>private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
      // TODO add your handling code here:
      Runtime rt = Runtime.getRuntime();
      try {
          Process pr = rt.exec("msg * hello");
      } catch (IOException ex) {
          Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
      }
  } 
  </code></pre>