java - Why is getWindow() not able to be resolved?

ID : 274531

viewed : 25

Tags : javajavascriptjava-7jsobjectjava





Top 4 Answer for java - Why is getWindow() not able to be resolved?

vote vote

92

In jdk1.7.0_11, I noticed that there are two separate jars within

../jre/lib/  

that contain the netscape.javascript.JSObject.class, namely

  • jfxrt.jar
  • plugin.jar

In the case of my IDE (IntelliJ), when I created a project SDK for Java it added both the jfxrt.jar and the plugin.jar jars to the classpath.

As the jfxrt.jar appears alphabetically before plugin.jar in the classpath, my application code was not resolving

JSObject.getWindow(...) 

properly.

As we're not using JavaFX within our application I simply removed the jfxrt.jar from my projects Java SDK classpath.

vote vote

90

Is the "MAYSCRIPT" applet tag parameter declared ?

<APPLET code="XYZApp.class" codebase="html/" align="baseline"  width="200" height="200" MAYSCRIPT> 

vote vote

71

I think you have to add:

import java.awt.Window; import java.awt.event.WindowEvent 
vote vote

69

Top 3 video Explaining java - Why is getWindow() not able to be resolved?







Related QUESTION?