我尝试在HTML页面中运行我的JNLP文件,但是Java插件无法运行JNLP文件,只能运行Applet。
以下是我的代码:
<applet width="800" height="500" codebase="http://127.0.0.1:8888/applets/"
code="br.com.app.server.utils.CompatibilityApplet"
archive="CompatibilityApplet.jar">
<param name="jnlp_ref" value="http://127.0.0.1:8888/applets/testehellojws.jnlp">
</applet>
谢谢。
[编辑]
举个例子:
http://java.sun.com/javase/ja/6/ea/6u10/plugin2/jnlp/CompatibilityApplet.java
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+" codebase="http://127.0.0.1:8888/applets/" href="testehellojws.jnlp">
<information>
<title>App Hello</title>
<vendor>My App Jnlp.</vendor>
<homepage href="http://127.0.0.1:8888/Home.html"/>
<description>My App Jnlp</description>
<description kind="short">Appr</description>
<icon href="images/icone.jpg"/>
</information>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="hello.jar" main="true"/>
</resources>
<application-desc main-class="br.com.app.server.HelloJWS"></application-desc>
</jnlp>
请编辑您的问题并告诉我它已被编辑。
好的。
你错过了documentBase的部分吗?
没有。
我建议删除applet名称属性中的空格。
完成。
你能运行其他嵌入式JNLP小程序吗?例如,在我的网站上小型(沙盒)GIFanim小程序?
可以。
从这里报告给您的是什么信息?
java.vendor:Sun Microsystems Inc. java.version: 1.6.0_26 os.name: Windows 7 os.version:6.1
object
元素可能会欺骗JRE认为它必须重新下载它。但不要满足于此,使用deployJava.js编写正确的applet(/object/embed...等)元素。 - Andrew Thompson