JNLP作为HTML页面中的Applet [英] JNLP as a Applet in HTML page

查看:297
本文介绍了JNLP作为HTML页面中的Applet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行一个HTML页面中我的JNLP,但Java插件不运行JNLP,只运行小程序。

下面是我的code:

 <小程序WIDTH =800HEIGHT =500codeBase类=htt​​p://127.0.0.1:8888/applets/
    code =br.com.app.server.utils.CompatibilityApplet
    归档=CompatibilityApplet.jar>
            < PARAM NAME =jnlp_refVALUE =htt​​p://127.0.0.1:8888/applets/testehellojws.jnlp>
< /小程序>

感谢。

一个例子:

HTTP://java.sun。 COM / JavaSE的/ JA / 6 / EA / 6u10中/ plugin2 / JNLP / CompatibilityApplet.java

 <?XML版本=1.0编码=UTF-8&GT?;
< JNLP规范=6.0+codeBase类=htt​​p://127.0.0.1:8888/applets/的href =testehellojws.jnlp>
    <信息>
        <标题>应用你好< /标题>
        <供应商>我的应用程序的JNLP< /卖主GT;
        <网页HREF =htt​​p://127.0.0.1:8888/Home.html/>
        <描述>我的应用程序的JNLP< /描述>
        <描述KIND =短>&APPR LT; /描述>
        <图标HREF =图像/ icone.jpg/>
    < /信息>
    <资源>
        < J2SE版本=1.6+HREF =htt​​p://java.sun.com/products/autodl/j2se/>
        <罐子HREF =hello.jar主要=真/>
    < /资源>
    <应用降序排序主级=br.com.app.server.HelloJWS>< /应用递减>
< / JNLP>


  

请编辑你的问题,只是让我知道它是编辑。


确定


  

你错过对文档基的一部分吗?


我没有。


  

我会建议去除小程序名称属性的空间。


完成


  

可以在运行任何其他JNLP嵌入式小程序?例如。小(沙箱)GIFanim我的网站的小程序?



  

什么信息。你得到从这里报道?


java.vendor:Sun Microsystems公司

java.version:1.6.0_26

os.name:Windows 7的

os.version:6.1


解决方案

在检查了相关的帖子,我决定测试标签

 <对象>


我认为这不会与JNLP工作,所以我们之前测试过。
改变后

 <&APPLET GT;

 <对象>

和引用我的JNLP文件作为一个参数,它的工作!
浏览器会忽略code和存档参数和运行我的JNLP

感谢。

I'm trying to run my JNLP within an HTML page, but the java plugin does not run the JNLP, runs only the Applet.

Here is my code:

<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>

Thanks.

[EDIT]

An example:

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.

OK

Did you miss the part about the documentBase?

I didn't.

I would recommend removing the space in the applet name attribute.

Done

Can you run any other JNLP embedded applets? E.G. the small (sand-boxed) GIFanim applet at my site?

Yes

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

解决方案

Checking on a related post, I decided to test the tag

<OBJECT>

. I thought that this would not work with JNLP, so we had tested before. After changing

<APPLET> 

to

<OBJECT> 

and referencing my jnlp file as a parameter, it worked! The browser ignores the code and archive parameters and run my JNLP.

thanks.

这篇关于JNLP作为HTML页面中的Applet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆