Java Applet“未加载”
我在将超级简单的小程序嵌入我的网站时遇到问题。当我打开页面时,底部栏上的控制台显示“Applet TestApplet notloaded”,并且在小程序应运行的空间中显示文本“错误。单击查看详细信息”。我使用 filezilla 将 html 和 .class 文件推送到“http://nuevawave.org/sandbox/JavaGallery/”。该 html 文件称为 Test.html 。当我从 netbeans 运行该小程序时,它工作正常。
这是 HTML:
<html>
<head>
<title>Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
words...
<applet codebase ="http://nuevawave.org/sandbox/JavaGallery/" code="TestApplet.class" width="250" height="300" />
</body>
</html>
I am having trouble embedding a super simple applet into my website. When I open the page, the console on the bottom bar says "Applet TestApplet notloaded" and the text "Error. Click for details" in the space where the applet should run. I used filezilla to push the html and .class file to "http://nuevawave.org/sandbox/JavaGallery/". The html file is called Test.html . The applet works fine when I run it from netbeans.
Here is the html:
<html>
<head>
<title>Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
words...
<applet codebase ="http://nuevawave.org/sandbox/JavaGallery/" code="TestApplet.class" width="250" height="300" />
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的 FF 版本信息更丰富。
这表明该小程序位于
test
包中,因此应位于..http://nuevawave.org/sandbox/JavaGallery/test/TestApplet.class
目前它在这里..
http://nuevawave.org/sandbox/JavaGallery/TestApplet.class
编辑1
经过更多窥探之后那个网站,我将以下内容放在一起。
HTML
将此 HTML 放在 http://nuevawave.org/sandbox/JavaGallery/applet.html
输出
My version of FF is more informative.
This indicates the applet is in the package
test
, and should therefore be located at..http://nuevawave.org/sandbox/JavaGallery/test/TestApplet.class
At the moment it is here..
http://nuevawave.org/sandbox/JavaGallery/TestApplet.class
Edit 1
After more snooping around that site, I threw the following together.
HTML
Put this HTML at http://nuevawave.org/sandbox/JavaGallery/applet.html
Output