English 中文(简体)
贾瓦 app微粒
原标题:Java applet error

我正在做一个关于Applets的项目。我使用NetBeans设计了Applet。在NetBeans中构建项目后,我从“ build”目录中获取“ classes”目录和一个.html文件,并将它们移动到另一个新目录。该.html文件包括Applet。当从我的桌面查看时,.html文件正确显示Applet。

我使用 FileZilla 将“classes”文件夹和 .html 文件上传到我的免费服务器(host4ufree.com)。如果我尝试在线查看网页,而不是显示小程序,我会获得以下错误:

java.lang.ClassFormatError:类文件末尾有额外的字节

我正在使用JDk 1.6.0 更新18,并使用FileZilla将文件以ASCII和二进制格式上传。然而,我仍然无法解决错误问题。有谁知道解决方法吗?我尝试将applet添加到网页的方式是否有问题?

问题回答

这个问题不太清楚:S 无论如何...

I uploaded the "classes" folder and the .html file to my free server (host4ufree.com) using FileZilla.

如果您的小程序包含不止一个类,我不建议直接上传项目类文件夹,而应该在部署之前将您的小程序类打包成jar文件。 delpoying


报告是否有帮助。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签