title: Unable to connect to Derby Database in NetBeans 7.0.1
body: <p>I have installed NetBeans7.0.1 version and jdk1.7.0_51, jre7 in windows 8 under <code>Program Files</code> (not <code>Program Files(x86)</code>), when I'm trying to connect to the Derby database I'm getting following error:</p>
  
  <pre><code>unable to connect. cannot establish a connection to jdbc:derby://localhost:1527/sample using org.apache.derby.jdbc.clientdriver
  </code></pre>
  
  <p>And I have tried for the solution and I got a solution to add grant command in "security.policy" file but when i'm modifying that file I'm getting "please check this file is opened in another program". But I have not opened that file anywhere....plz help....thanks in advance</p>