title: java.io.IOException: Cannot run program
body: <p>I created new java project in Netbeans:</p>
  
  <pre><code>package copyfiles;
  
  import java.io.File;
  import java.io.FileInputStream;
  
  public class CopyFiles {
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {
          // TODO code application logic here
      }
  }
  </code></pre>
  
  <p>And I selected:</p>
  
  <ol>
  <li>Clean and Build Main Project</li>
  <li>Run Main Project</li>
  </ol>
  
  <p>I have an error: </p>
  
  <pre><code>java.io.IOException: Cannot run program "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" (in directory "/Users/xxx/yyy/kopiowanie plików/CopyFiles"): error=2, No such file or directory
  </code></pre>
  
  <p>What is wrong?</p>