【问题标题】:Integrate applet in html?在html中集成小程序?
【发布时间】:2012-08-24 15:18:24
【问题描述】:
<html>
<applet code="de.wim.outldd.examples.DragDropTest_ModeMemoryStream" archive="outIdd.jar" width="500" height="500"/>

</html>

我尝试在 HTML 中打开这个 applet,但我得到一个 ClassNotFoundException。 html 与 .jar 位于同一目录中。在代码属性中,我将目录结构放在 .jar 中的类中。请有人试试这些。

【问题讨论】:

    标签: java html applet classnotfoundexception


    【解决方案1】:
    <applet 
      code="de.wim.outldd.examples.DragDropTest_ModeMemoryStream" 
      archive="outIdd.jar" 
      width="500" 
      height="500"/>
    

    applet 元素曾经打算自封闭,即 jar 名称中的小写“l”(代表 Lucy)而不是大写“I”(代表 Imogen)。所以元素应该是这样的:

    <applet 
      code="de.wim.outldd.examples.DragDropTest_ModeMemoryStream" 
      archive="outldd.jar" 
      width="500" 
      height="500">
    </applet>
    

    【讨论】:

    • 非常感谢我自己会想到的,虽然没有我得到一个 java.lang.ExceptionInInitializerError??
    猜你喜欢
    • 2013-06-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-10
    • 1970-01-01
    相关资源
    最近更新 更多