Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在eclipse中放置小程序_Java_Eclipse_Xhtml_Applet - Fatal编程技术网

Java 在eclipse中放置小程序

Java 在eclipse中放置小程序,java,eclipse,xhtml,applet,Java,Eclipse,Xhtml,Applet,我在eclipse中制作了一个小程序,我可以通过右键单击java文件并以->java小程序的方式运行它 但我想将该小程序添加到xhtml文件中,因此在index.xhtml文件中添加了小程序标记,但当我在浏览器中部署index.xhtml时,我只收到一个错误,说明找不到MyApplet.class <applet code="com.project.helper.MyApplet.class" width="500" height="500

我在eclipse中制作了一个小程序,我可以通过右键单击java文件并以->java小程序的方式运行它

但我想将该小程序添加到xhtml文件中,因此在index.xhtml文件中添加了小程序标记,但当我在浏览器中部署index.xhtml时,我只收到一个错误,说明找不到MyApplet.class

<applet code="com.project.helper.MyApplet.class" width="500" height="500">

必须定义小程序xhtml行的存档属性,该属性是小程序jar文件的位置,类属性应从中加载

<applet code="com.project.helper.MyApplet.class" archive="MyApplet.jar" width="500" height="500">

必须定义小程序xhtml行的存档属性,该属性是小程序jar文件的位置,类属性应从中加载

<applet code="com.project.helper.MyApplet.class" archive="MyApplet.jar" width="500" height="500">


谢谢!我可以用这种方式添加小程序,但即使这样,我的小程序也不能正常工作。小程序与USB设备一起工作,当我右键单击java文件并将其作为小程序运行时,它工作良好,但添加到xhtml文件后它不工作,它只是保持空白,不起任何作用小程序应该与获得数字签名的USB设备一起工作,下面是小程序代码:谢谢!我可以用这种方式添加小程序,但即使这样,我的小程序也不能正常工作。小程序与USB设备一起工作,当我右键单击java文件并将其作为小程序运行时,它工作正常,但添加到xhtml文件后它不工作,它只是保持空白,不做任何事情小程序应该与获得数字签名的USB设备一起工作,小程序代码如下: