我试图在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>
Please edit your question and just let me know it is edited.
好
Did you miss the part about the documentBase?
我没有
I would recommend removing the space in the applet name attribute.
完成
Can you run any other JNLP embedded applets? E.G. the small (sand-boxed) GIFanim applet at my site?
是
What info. do you get reported from here?
java.vendor:Sun Microsystems Inc.
java.version:1.6.0_26
os.name:Windows 7
os.version:6.1
解决方法:
您的jnlp_ref可能应该是绝对URI,例如http://127.0.0.1:8888/applets/testehellojws.jnlp
在代码值的开头也有一个空格(尽管这可能不是造成问题的原因).