title: How to open a html file?
body: <p>I have been trying to open a <code>htmlfile</code> on clicking help button.   And i need to import the file to source package so after build it wont show errors. I am using <code>netbeans</code>.  When i copied the file to <code>src</code> and tried running the file it showed error in compiling.  I want to know how to add the file to <code>src</code> and how to open by asking the user with a list of browsers installed in the system. Here is the code i have searched and tried..Thanks in advance</p>
  
  <pre><code>  try 
    {           
        File htmlFile = new File(this.getClass().getResource("help.html").getFile());
        Desktop.getDesktop().browse(htmlFile.toURI());
    } 
    catch (IOException ex)
    {
        System.out.println(ex);
    }
  </code></pre>