views:

242

answers:

1

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"/&gt;
    <icon href="http://....gif"/&gt;
    <!--          <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?

A: 

From experimentation I've found that properties defined in extension files are under much stricter rules than the ones in the main jnlp file, and those not conforming to the rules are silently discarded.

Thorbjørn Ravn Andersen