Sun's IExplorerAppletContext's getJSObject() method throws a
NullPointerException.
Stack is:
java.lang.NullPointerException
at sun.plugin.viewer.context.IExplorerAppletContext.getJSObject(IExplorerAppletContext.java:132)
at sun.plugin.AppletViewer.getDocumentBase(AppletViewer.java:957)
at sun.plugin.AppletViewer.getCodeBase(AppletViewer.java:1019)
at sun.plugin.AppletViewer.appletInit(AppletViewer.java:548)
at sun.plugin.viewer.LifeCycleManager.initAppletPanel(LifeCycleManager.java:171)
at sun.plugin.viewer.IExplorerPluginObject$Initer.run(IExplorerPluginObject.java:169)
Looking at sun's implementation we see:
public synchronized netscape.javascript.JSObject getJSObject() {
JSObject jsObj = getJSObject(handle);
jsObj.setIExplorerAppletContext(this);
return jsObj;
}
Line 132 is the call to setIExplorerAppletContext(this);
"handle" is a member int initialized to 0 and presumably should be set
in setAppletContextHandle(int)
So it looks like the getJSObject(int) method, which has a native
implementation, is returning a null object and no one bothers to check
if this object is null.
Is this a bug or are there any issues I should know about?
Sorry, I don't have the applet code itself. This is all I have.