[英]Put an applet in eclipse
我已经在eclipse中创建了一个applet,并且可以通过右键单击java文件并以-> Java Applet的方式成功运行它
但是我想将该小程序添加到xhtml文件中,所以在index.xhtml文件中添加了小程序标签,但是当我在浏览器中部署index.xhtml时,我得到一个错误,提示找不到MyApplet.class
<applet code="com.project.helper.MyApplet.class" width="500" height="500">
我以这种方式组织了文件:
您必须定义applet xhtml行的archive属性,这是应从中加载class属性的applet jar文件的位置。
<applet code="com.project.helper.MyApplet.class" archive="MyApplet.jar" width="500" height="500">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.