Java WebStart: <property ...> ignored when using <extension>?

Posted by Thorbjørn Ravn Andersen on Stack Overflow See other posts from Stack Overflow or by Thorbjørn Ravn Andersen
Published on 2009-04-22T11:06:40Z Indexed on 2010/06/02 8:03 UTC
Read the original article Hit count: 285

Filed under:
|
|

I have a problem modernizing a Java WebStart application under Java 6 u 13 (the latest at this moment)

We desire to use the new mechanism to have several master configuration files each with their own configuration , which then "include" another jnlp file which is autogenerated to ensure that the jar list is accurate. After quite a bit of poking I have made it work, except for the fact that the properties defined in the master file is not available to the program when Main is invoked.

The master JNLP looks like (anonymized):

<jnlp>
  <information>
    <title>...</title>
    <vendor>...</vendor>
    <description>...</description>
    <description kind="short">...</description>
    <homepage href="http://....jnlp"/>
    <icon href="http://....gif"/>
    <!--          <offline-allowed/> -->
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+"/>
    <extension href="http://...extension.jnlp" />

    <property name="server.name" value="SERVER"/>
  </resources>
  <application-desc main-class="Main"/>
</jnlp>

and the extension.jnlp looks like:

<!-- Generated automatically.  Do not edit! -->
<jnlp>
  <information>
    <title>extension built 2009-04-22 12:39:58 CEST</title>
    <vendor>...</vendor>
  </information>
  <security><all-permissions/></security>
  <resources>
    <jar href="A.jar" />
    <jar href="B.jar" />
    <jar href="logback-classic-0.9.14.jar" />
    <jar href="logback-core-0.9.14.jar" />
    <jar href="slf4j-api-1.5.6.jar" />
  </resources>
  <component-desc />
</jnlp>

I have tried putting the proprty in the extension.jnlp too. Did not help. The JVM is reused and not relaunched according to the log in the Java Plugin Console.

Any suggestions?

© Stack Overflow or respective owner

Related posts about java

Related posts about webstart