簡體   English   中英

將小程序放在日食中

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM