【发布时间】:2013-12-11 21:11:34
【问题描述】:
我尝试在我的网络应用程序中使用小程序。
小程序类:
public class TestApplet extends JApplet {
@Override
public void init() {
try {
System.out.println("Applet!");
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JLabel lbl = new JLabel("Hello World");
add(lbl);
}
});
} catch (Exception e) {
System.err.println("createGUI didn't complete successfully");
}
}
}
在 JSP 中:
<applet code="TestApplet.class" width="320" height="120" ></applet>
但是当我在加载小程序后加载页面时,我得到了这个错误。
ClassFormatError - Incompatible magic value 168430090 in class file TestApplet.
在我的应用中,我使用 Spring Security - 如果相关的话。
【问题讨论】:
-
This 可能会有所帮助。
-
我看到了,但是 Weblogic 有解决方法。我使用 TomCat 7,并尝试将其转换为 TomCat,但无法正常工作。我又遇到了这个错误。
标签: java jakarta-ee applet jsessionid