栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

这个applet是否可以在Iced Tea JRE中使用?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

这个applet是否可以在Iced Tea JRE中使用?

以下是输出

java.stderr
(相当于Java
控制台的一半-另一半是
java.stdout
,在您的情况下为空):

net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet.        at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:604)        at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548)        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729)Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Jars not verified.        at net.sourceforge.jnlp.runtime.JNLPClassLoader.checkTrustWithUser(JNLPClassLoader.java:467)        at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:410)        at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:168)        at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:249)        at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:575)        ... 2 moreCaused by: net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Jars not verified.        at net.sourceforge.jnlp.runtime.JNLPClassLoader.checkTrustWithUser(JNLPClassLoader.java:467)        at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:410)        at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:168)        at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:249)        at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:575)        at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548)        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729)java.lang.NullPointerException        at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99)        at sun.applet.AppletPanel.run(AppletPanel.java:380)        at java.lang.Thread.run(Thread.java:636)java.lang.NullPointerException        at sun.applet.AppletPanel.run(AppletPanel.java:430)        at java.lang.Thread.run(Thread.java:636)java.lang.Exception: Applet initialization timeout        at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:637)        at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)        at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)java.lang.RuntimeException: Failed to handle message: handle 60822154 for instance 2        at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:660)        at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)        at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)Caused by: java.lang.Exception: Applet initialization timeout        at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:637)        ... 2 more

因此,如果我在 对话框中按“取消”,则看起来甚至没有加载您的applet代码

我认为您在Java方面无能为力-也许使用其他签名过程或通过JNLP启动applet会有所帮助。或在IcedTea上提交错误报告。

为了演示这一点,我通过省略了小应用程序中的所有关键内容,创建了一个真正的简单小应用程序:

package org.pspre.eg.docload;import java.awt.FlowLayout;import javax.swing.*;public class Example extends JApplet {    JLabel label;    public void init()    {        System.out.println("init()");        SwingUtilities.invokeLater(new Runnable(){public void run() { label = new JLabel("inited."); getContentPane().setLayout(new FlowLayout()); getContentPane().add(label);        }});    }    @Override    public void start() {        System.out.println("start()");        label.setText("started.");    }    @Override    public void stop() {        System.out.println("stop()");        label.setText("stopped.");    }    @Override    public void destroy() {        System.out.println("destroy()");        label.setText("destroyed.");    }}

我对此进行了编译,并修改了HTML文件以使用它,它给出了完全相同的症状。

当用户按下“取消”时,IcedTea似乎已经重新定义了操作。为了公平,在对话框中的按钮是“运行”和“取消”,而不是“运行的所有权限”和“运行沙盒”。

(在Sun的对话框中,有相同的按钮,但实际上它们的含义不是所要求的。)



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/573882.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号