<html>
    <head>
      <base href="http://icedtea.classpath.org/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - JSObject.getWindow(null) NullPointerException"
   href="http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3190">3190</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>JSObject.getWindow(null) NullPointerException
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>IcedTea-Web
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>1.6.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86_64
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Plugin
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>jvanek@redhat.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pdewacht@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>unassigned@icedtea.classpath.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>A JSObject.getWindow(null) call results in a NullPointerException:

Exception in thread "Processor" java.lang.NullPointerException
    at netscape.javascript.JSObject.getWindow(JSObject.java:278)
    at
keytradebank.eidapplet.ReaderContext$Processor.run(ReaderContext.java:101)

(This is an applet "in the wild", not my own code.)

I'm not sure if there's a specification for this API, but this usage is shown
in Oracle's documentation, e.g. in
<a href="http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/customized_loading.html">http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/customized_loading.html</a>

    JSObject window = JSObject.getWindow(null);
    window.call("someJavaScriptFunction", args); 

as well as in other documentation (e.g. <a href="http://webswing.org/2.4/app/jslink/">http://webswing.org/2.4/app/jslink/</a>),
so I assume it works on other platforms.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>