为什么getWindow()无法解析?

Hel*_*rld 20 javascript java java-7 jsobject

我无法解析getWindow(); 出于某种原因的方法......

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();
}
}
Run Code Online (Sandbox Code Playgroud)

小智 48

在jdk1.7.0_11中,我注意到../jre/lib/中有两个独立的jar包含netscape.javascript.JSObject.classjfxrt.jar和plugin.jar.对于我的IDE(IntelliJ),当我创建一个项目SDK for Java时,它将jfxrt和插件jar添加到类路径中.由于jfxrt.jar在类路径中的plugin.jar之前按字母顺序出现,因此我的应用程序代码无法JSObject.getWindow(...)正确解析.由于我们在应用程序中没有使用JavaFX,因此我只是从项目Java SDK类路径中删除了jfxrt.jar.