I have made an applet in eclipse, and I can run it succesfully with right click on the java file and run as -> Java Applet
But I want to add that applet into a xhtml file, so added the applet tag in the index.xhtml file but when I deploy the index.xhtml in the browser I just get an error saying that the MyApplet.class cannot be found
<applet code="com.project.helper.MyApplet.class" width="500" height="500">
I have the files organized in this way:
您必须定义applet xhtml行的archive属性,这是应从中加载class属性的applet jar文件的位置。
<applet code="com.project.helper.MyApplet.class" archive="MyApplet.jar" width="500" height="500">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.