我在使用netbeans将JApplet部署到正常工作的Web服务器时遇到问题。会发生什么似乎是加载小程序,但随后加载时,我只是留下一个空白的屏幕和没有按钮。我想这可能是因为我使用的是布局设计,或者是因为所需的库没有包含在.jar中。我正在使用Atmos包装函数和一些外部.jar文件。Java Applet Web部署问题
任何帮助将会很棒!如果您需要更多信息,请询问!
public void init() {
// initialise any variable we have created
cloud = new CloudClass();
user = new User();
sourceFiles = null;
dest = null;
/*
* Set the Nimbus look and feel
*/
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/*
* If Nimbus (introduced in Java SE 6) is not available, stay with the
* default look and feel. For details see
* http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(ArFileJApplet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(ArFileJApplet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(ArFileJApplet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(ArFileJApplet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/*
* Create and display the applet
*/
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
// initialise any previously uninitialised variables
initComponents();
invalidLogin_label.setVisible(false);
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
编辑:我扭捏了一下周围,现在的小应用程序页面简单地与网页上的错误,说“错误,请为”出现
点击该说的COM/EMC/ESU/API/EsuException并单击详细信息按钮让我这可能是帮助所有的博学类型..
C语言带来的调试选项:清除控制台窗口 F:最终确定对象在结束队列 G:垃圾收集 h:显示此帮助消息 升:转储类加载器列表 米:打印内存使用 ○:触发的日志记录 问:隐藏控制台 R:重新加载策略配置 S:转储系统和部署属性 吨:转储线程列表 ν:转储线程堆栈 X :清除类载入缓存 0-5:设置跟踪级别
1)确保每个catch都有一个'e.printStackTrace()'2)检查Java控制台的输出。 3)发布HTML,applet'init()'方法和一个链接到测试小程序作为对问题的编辑。 –
不确定如何为测试小程序提供链接,我可以将您链接到我遵循的教程以创建Web应用程序 http://netbeans.org/kb/docs/web/applets.html –
@MatthewPigram:有一件事遗漏了,在我看来,你没有签署你的.jar文件,所以它可以作为Java Web Start运行,他们在那里教你如何做到这一点? [如何签署.jar文件](http://frequal.com/java/SignAllAppletJars.html),可能不会帮助,但不确定这是问题的根源,但:( –