Ruben Laguna's blog

Jul 3, 2010 - 1 minute read - area document documentarea empty exception grey hide java netbeans npe null nullpointer nullpointerexception pointer

NullPointerException when using hideEmptyDocArea

When I put

run.args.extra=-J-Dnetbeans.winsys.hideEmptyDocArea=true

in my project.properties I got a NullPointerException (NPE) at startup. I though it was a bug and I reported it but then I realized that I got the NPE because I had removed/hidden also the editor.wsmode in my layer.xml

...
...
<folder name="Windows2">
  <folder name="Modes">
    <folder name="editor_hidden"/>
    <file name="editor.wsmode_hidden"/>
  </folder>
</folder>
...
...

As soon as I removed those entries from the layer.xml hideEmptyDocAre worked perfectly.