java 未找到小程序类
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14385825/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Applet class not found
提问by Eliza
I new with applets, and I'm trying to display the applet in my html. (I have installed the plug-in and I'm using Chrome, and i have tried it on IE)
我是小程序的新手,我试图在我的 html 中显示小程序。(我已经安装了插件,我用的是Chrome,我在IE上试过)
as you can see the applet class is in the source package and I would like to display it in the page that is in the web pages folder
如您所见,小程序类位于源包中,我想将其显示在网页文件夹中的页面中
this is my code:
这是我的代码:
<applet codebase="/AppletPackage/Applet" code="Applet.class" width=800 height=300>Applet Failed</applet>
采纳答案by Ebrahim Amini Sharifi
First make sure your jar file is inside the html file then Try this:
首先确保你的 jar 文件在 html 文件中,然后试试这个:
<applet archive="AppletJarFile.jar" code="AppletPackage.AppletClassName" width=800 height=300>Applet Failed</applet>
On Html5
在 HTML5 上
<object type="application/x-java-applet" height="400" width="500">
<param name="code" value="AppletPackage.AppletClassName" />
<param name="archive" value="AppletJarFile.jar" />
Applet failed to run. No Java plug-in was found. </object>
回答by Arpit
Try this
试试这个
<applet code="Applet" codebase="/AppletPackage" width=800 height=300>Applet Failed</applet>