如何导出java小程序
首先,我不是 Java 程序员,所以也许(希望:D)这个问题很容易解决。 我编写了一个简单的小程序,使用第三方库将文件从客户端发送到远程 FTP 服务器。当我在 eclipse applet 查看器中运行它时,一切正常,但是当我在 Web 浏览器中尝试它时,我看到这样的消息:
Exception in thread "thread applet-prova.class-2" java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FileTransferClient
at prova.start(prova.java:32)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
我想存在一些编译/打包问题...小程序应该经过良好签名,所以,不安全问题应该存在
First of all I'm not a Java programmer, so maybe (hopefully :D) this problem could be very simple to solve.
I've wrote a simple applet to send file from client to a remote FTP server with a third-part library. When I run it in my eclipse applet viewer everything works correctly, but when i try it in my web browser I see a message like this:
Exception in thread "thread applet-prova.class-2" java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FileTransferClient
at prova.start(prova.java:32)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I suppose there is some compiling/packaging issue... the applet should be well signed so, no security problem should be there
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NoClassDefFoundError
意味着com/enterpriset/net/ftp/FileTransferClient
在编译时存在,但在运行时丢失。我并不是真正的 Applet 专家,但据我所知,您需要在
如果您使用
实际上,提供 HTML 可能会有所帮助。
The
NoClassDefFoundError
means thatcom/enterprisedt/net/ftp/FileTransferClient
was there at compile time but is missing at runtime.I'm not really an Applet expert but as far as I know, you need to list all dependencies (i.e. including the jar providing the above class) in the
archive
attribute of the<APPLET>
tag.If you are using
<OBJECT>
or<EMBED>
, see Q: How do I specify a JAR file as part of an OBJECT or EMBED tag? in the FAQ.Actually, providing the HTML might help here.