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

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

问题描述

我试图在 HTML 页面中运行我的 JNLP,但 java 插件不运行 JNLP,只运行小程序.

这是我的代码:

<applet width="800" height="500" codebase="http://127.0.0.1:8888/applet/"代码="br.com.app.server.utils.CompatibilityApplet"存档=兼容性Applet.jar"><param name="jnlp_ref" value="http://127.0.0.1:8888/applets/testehellojws.jnlp"></小程序>

谢谢.

示例:

http://java.sun.com/javase/ja/6/ea/6u10/plugin2/jnlp/CompatibilityApplet.java

<块引用>

请编辑您的问题,让我知道它已被编辑.

好的

<块引用>

您是否错过了有关 documentBase 的部分?

我没有.

<块引用>

我建议删除小程序名称属性中的空格.

完成

<块引用>

您可以运行任何其他 JNLP 嵌入式小程序吗?例如.我网站上的小(沙盒)GIFanim 小程序?

是的

<块引用>

什么信息.你会从这里被举报吗?

java.vendor: Sun Microsystems Inc.
java.version: 1.6.0_26
操作系统名称:Windows 7
操作系统版本:6.1

解决方案

查看相关帖子,我决定测试标签

.我认为这不适用于 JNLP,所以我们之前测试过.改变后

并引用我的 jnlp 文件作为参数,它起作用了!浏览器忽略代码和存档参数并运行我的 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天全站免登陆