我们有一个由java web start部署的应用程序 . 应用程序可以成功启动,但不会在Java Cache Viewer的“Applications”列表中创建条目 . 但是所使用的资源都列在“资源”部分中 .

jnlp确实创建了桌面快捷方式以及程序文件夹中的条目(如果install设置为true),它们可以成功启动 .

以下是jnlp的结构:

<?xml version="1.0" encoding="utf-8"?>
<jnlp 
    spec="6.0+" 
    href="XXX.jnlp"
    codebase="127.0.0.1"
    >
    <information>
        <title>The Title</title>
        <vendor>The Vendor</vendor>
        <description>Web Start</description>
        <icon href="images/logo32x32.png"/>
        <icon kind="splash" href="images/splash.png"/>
        <shortcut online="true" install="false">  
            <desktop/>   
            <menu submenu="XXX"/>
        </shortcut> 
    </information>
    <update check="always" policy="always" />
    <resources>
        <j2se version="1.8+" />
        <jar href="xxx/mainClient.jar" main="true"/>
        <jar href="xxx/lib/SomeLib.jar" />
        <jar href="xxx/lib/SomeOtherLib.jar" />
    </resources>
    <security>
        <all-permissions/>
    </security> 

    <application-desc 
        main-class="xxx.xxx.MainForm" 
        name="XXX">
            <argument>-Duser.language=en</argument>
    </application-desc>
</jnlp>

我还尝试了很多其他标志组合:

  • 有或没有离线允许

  • 有或没有jar元素的主要属性

  • 在线快捷方式元素/安装属性为true / false

  • 更新元素检查属性为超时/始终

我还能检查什么?

从这里开始演示应用程序时:http://docs.oracle.com/javase/tutorial/uiswing/examples/misc/index.html

它成功添加为Java Cache Viewer中的“Application” . 我在几个系统上测试了我们的jnlp,它们都表现出同样的问题 .