OpenWebStart + IcedTea-Web:JNLP详细信息和JavaScript按钮

问题描述 投票:0回答:1

虽然我可以使用OpenWebStart运行一个旧的Swing示例,但仍然存在一些有关配置的未解决问题。

这里是我正在使用的JNLP文件:

<?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://www.softsmithy.org/softsmithy-lib/lib/3.0-SNAPSHOT/docs/samples/dist" href="../../tutorial/swing/action/ConfigureButtonsSample.jnlp">
  <information>
    <title>Configure Buttons Sample</title>
    <vendor>SoftSmithy</vendor>
    <homepage href="../tutorial/swing/action/index.html"/>
    <description>Configure Buttons Sample</description>
    <icon href="../../../logo.jpg"/>
    <offline-allowed/>
    <shortcut online="true"/>
  </information>
  <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="11+"/>
    <jar href="softsmithy-lib-samples-3.0-SNAPSHOT.jar" main="true"/>
    <jar href="lib/softsmithy-lib-awt-3.0-SNAPSHOT.jar"/>
    <jar href="lib/softsmithy-lib-beans-3.0-SNAPSHOT.jar"/>
    <jar href="lib/softsmithy-lib-core-3.0-SNAPSHOT.jar"/>
    <jar href="lib/softsmithy-lib-swing-3.0-SNAPSHOT.jar"/>
    <jar href="lib/jlfgr-1_0.jar"/>
    <jar href="lib/slf4j-api-1.7.30.jar"/>
    <jar href="lib/slf4j-jdk14-1.7.30.jar"/>
  </resources>
  <application-desc main-class="samples.swing.action.ConfigureButtonsSample"/>
</jnlp>

并且在HTML文件中,我正在使用:

  <script src="http://java.com/js/deployJava.js"></script>
  [...]
  <script>
      var url = "ConfigureButtonsSample.jnlp";
      deployJava.createWebStartLaunchButton(url, '11');
  </script> 

创建启动按钮:http://www.softsmithy.org/softsmithy-lib/lib/3.0-SNAPSHOT/docs/tutorial/swing/action/index.html#utility

问题

  1. DOCTYPE是否仍然正确?有较新的版本吗?甚至是XSD?
  2. 我们应该在j2se元素中使用哪个URL?
  3. 我们仍应使用相同的JavaScript脚本来创建启动按钮吗?还是也有该脚本的替代品?
javascript java java-web-start icedtea-web openwebstart
1个回答
0
投票

一口气问了三个问题?哦......>

  1. 更多信息here。是的,这是一个链接答案,并且有多个版本的JNLP规范,因此,我不愿意在此处复制/粘贴一个。]通过查找“ jnlp xsd”。

  2. 来自documentation

  3. href:表示此Java软件版本的供应商以及可以从何处下载的URL。

    个人,我不必理会该元素。

    不能说。也许问

© www.soinside.com 2019 - 2024. All rights reserved.