java getwindow,为什么getWindow()无法解析?

I can't resolve the getWindow(); method for some reason...

import java.applet.Applet;

import netscape.javascript.JSObject;

public class Class466 {

public static void method6020(Applet applet, String string, int i)

throws Throwable {

try {

JSObject.getWindow(applet).eval(string);

} catch (RuntimeException runtimeexception) {

throw Class346.method4175(runtimeexception, new StringBuilder()

.append("tf.a(").append(')').toString());

}

}

public static Object method6021(Applet applet, String string, short i)

throws Throwable {

try {

return JSObject.getWindow(applet).call(string, null);

} catch (RuntimeException runtimeexception) {

throw Class346.method4175(runtimeexception, new StringBuilder()

.append("tf.f(").append(')').toString());

}

}

public static Object method6022(Applet applet, String string,

Object[] objects, byte i) throws Throwable {

try {

return JSObject.getWindow(applet).call(string, objects);

} catch (RuntimeException runtimeexception) {

throw Class346.method4175(runtimeexception, new StringBuilder()

.append("tf.b(").append(')').toString());

}

}

Class466() throws Throwable {

throw new Error();

}

}

解决方案

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值