title: How to compile & run a project-less file in Netbeans?
body: <blockquote>
    <p>Netbeans, indeed any Java compiler and
    executor, needs to know the classpath
    to compile and run a file. When you
    just open a file in Netbeans, you do
    not tell it any of that information.
    When you set up a project, that
    process tells Netbeans where the Java
    resources are.</p>
  </blockquote>
  
  <p>Yet other IDEs can easily do this. It's not good practice, but it's simple and quick for "fooling around".</p>
  
  <p>Is there any way to compile &amp; run a file, that doesn't belong to a project, in Netbeans?</p>
  
  <p><strong>edit:</strong> The options are greyed out if the file doesn't belong to a project.</p>