Why is getWindow() not able to be resolved?

谁说胖子不能爱 提交于 2019-11-30 17:09:21

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 and plugin.jar. In the case of my IDE (IntelliJ), when I created a project SDK for Java it added both the jfxrt and the plugin 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.

Is the "MAYSCRIPT" applet tag parameter declared ?

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

I think you have to add:

import java.awt.Window;
import java.awt.event.WindowEvent
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!