JNLP没有在Java 1.8客户端上创建桌面快捷方式

use*_*108 7 java jnlp java-8

我有一个JNLP,它在Java 1.7下为我的应用程序创建了一个桌面快捷方式.但是,当我在Java 1.8下运行它时,我不再获得桌面快捷方式.发生了什么变化?

这是我在Windows XP,Windows 7和OS X Yosemite下测试的一个示例,它们都运行Java 1.7并且它为这三个创建了桌面快捷方式,但是在运行Java 1.8的Windows 7和Windows 8上我都没有得到桌面快捷方式.为了清楚起见,该应用程序显示并正常工作,只是没有创建桌面快捷方式.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd">
<jnlp codebase="http://services.SportsOptions.com/test/" href="test.jnlp">
  <information>
    <title>test</title>
    <vendor>test.com</vendor>
    <homepage href="http://www.test.com/"/>
    <description>Test</description>
    <icon href="splash.png" kind="splash"/>
    <offline-allowed/>
    <shortcut online="true">
      <desktop/>
      <menu submenu="test" />
    </shortcut>
  </information>
  <information os="Linux">
    <icon href="DesktopIcon.ico" kind="shortcut" />
  </information>
  <information os="Windows">
    <icon href="DesktopIcon.ico" kind="shortcut" />
  </information>
  <information os="Mac">
    <icon href="DesktopIcon.icns" kind="shortcut" />
  </information>
  <resources locale="" os="">
    <j2se href="http://java.sun.com/products/autodl/j2se" initial-heap-size="32m" max-heap-size="512m" version="1.6+"/>
    <jar download="eager" href="Test.jar" main="false" version=""/>
  </resources>
  <application-desc main-class="test.Main"/>
</jnlp>
Run Code Online (Sandbox Code Playgroud)

dim*_*414 1

OP的解决方案:

在Java 1.7中,读取<information>不带os属性的标签来获取所有公共信息,并且还读取<information os="...">包含<icon>每个单独操作系统的标签的标签。在 Java 1.8 中,一旦它看到<information>没有os属性的标签,它就不会读取带有os属性标签,这是我有桌面快捷方式图标的地方。因此,我必须创建三个单独的<information os="...">标签,每个标签对应一个操作系统,但每个标签中都重复所有常见信息。