1 Reply Latest reply: Mar 27, 2012 2:43 AM by 817264 RSS

    Webstart 6.0 Forcing JRE Version and Arch

    322268
      I have an Eclipse RCP application that is being deployed via Webstart 6.0. Our users hit our tomcat webserver and download the root jnlp. When the root JNLP is double-clicked the very first time (from the browser status bar) the application launches successfully. If the user attempts to launch the application again by double clicking on the file in their downloads folder or via the java application cache viewer the application fails. After much research I discovered that several of the jars are not being loaded on the second attempt, ie. org.eclipse.swt.win32.win32.x86_3.7.2.v3740f.jar). Looking at the javaws logs I found this difference:

      When it worked the log showed:
      <record>
      <date>2012-03-22T13:11:10</date>
      <millis>1332443470149</millis>
      <sequence>222</sequence>
      <logger>com.sun.deploy</logger>
      <level>FINE</level>
      <class>com.sun.deploy.util.LoggerTraceListener</class>
      <method>print</method>
      <thread>10</thread>
      <message>basic: DefaultMatchJRE:
      JREDesc: JREDesc[version 1.5+, heap=-1--1, args=null, href=null, sel=true, null, null]
      JREInfo: JREInfo for index 0:
      platform is: 1.6
      product is: 1.6.0_26
      location is: http://java.sun.com/products/autodl/j2se
      path is: C:\Program Files (x86)\Java\jre6\bin\javaw.exe
      args is: null
      native platform is: Windows, x86 [ x86, 32bit ]
      enabled is: true
      registered is: true
      system is: true

      Init Heap: -1
      Max Heap: 67108864
      Satisfying: false, true
      SatisfyingVersion: true
      SatisfyingJVMArgs: false, true
      SatisfyingSecure: false
      Selected JVMParam: [JVMParameters: isSecure: false, args: -Dosgi.instance.area=@user.home/AppData -Dosgi.configuration.area=@user.home/AppData -Declipse.application=com.issinc.tnsClient.core.application]
      Running JVMParam: [JVMParameters: isSecure: true, args: ]
      </message>
      </record>

      When it failed:

      record>
      <date>2012-03-22T13:11:45</date>
      <millis>1332443505434</millis>
      <sequence>214</sequence>
      <logger>com.sun.deploy</logger>
      <level>FINE</level>
      <class>com.sun.deploy.util.LoggerTraceListener</class>
      <method>print</method>
      <thread>10</thread>
      <message>basic: DefaultMatchJRE:
      JREDesc: JREDesc[version 1.5+, heap=-1--1, args=null, href=null, sel=true, null, null]
      JREInfo: JREInfo for index 0:
      platform is: 1.6
      product is: 1.6.0_30
      location is: http://java.sun.com/products/autodl/j2se
      path is: C:\Program Files\Java\jdk1.6.0_30\bin\javaw.exe
      args is: null
      native platform is: Windows, amd64 [ x86_64, 64bit ]
      enabled is: true
      registered is: true
      system is: true

      Init Heap: -1
      Max Heap: 67108864
      Satisfying: false, true
      SatisfyingVersion: true
      SatisfyingJVMArgs: false, true
      SatisfyingSecure: false
      Selected JVMParam: [JVMParameters: isSecure: false, args: -Dosgi.instance.area=@user.home/AppData -Dosgi.configuration.area=@user.home/AppData -Declipse.application=com.issinc.tnsClient.core.application]
      Running JVMParam: [JVMParameters: isSecure: true, args: ]
      </message>
      </record>

      My JNLP has:


      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="http://localhost:9080/RcpClient" href="rcpclient.jnlp">
           <information>
                <title>RCP Client</title>
                <vendor>My Company</vendor>
                <description>RCP Client Application</description>
                <shortcut>
                     <desktop/>
                </shortcut>
           </information>
           <security>
                <all-permissions/>
           </security>
           <update check="always" policy="always"/>
           <resources>
                <jar href="plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"/>
                <extension name="Wrapper feature" href="features/rcpClient_1.0.0.jnlp" />
                <property name="osgi.instance.area" value="@user.home/AppData"/>
                <property name="osgi.configuration.area" value="@user.home/AppData"/>
                <property name="eclipse.application" value="rcpClient.core.application"/>
           </resources>
           <resources os="Windows" arch="x86">
                <j2se version="1.5+"/>
           </resources>
           <application-desc main-class="org.eclipse.equinox.launcher.WebStartMain">
                <argument>-nosplash</argument>
           </application-desc>
      </jnlp>

      I've tried several different options on the j2se and the resources os="Windows", but with no success. How do I control the version of the jre used so that the app runs consistently? On my development laptop I have both a 32 and 64 bit JRE, our end users will most likely only have the 32 bit.
        • 1. Re: Webstart 6.0 Forcing JRE Version and Arch
          817264
          It will be easier if you will paste trace files. See troubleshooting guide for more details on how to get detailed trace:
          http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html#gcexdf

          The only weird thing in your log snippet (that is too small to give full picture) is that second time JRE is used from inside the JDK.
          This should not happen and likely caused by the fact JDK bin folder is in your system PATH (unless it is corrupt registry).
          Try removing it or add true JRE folder in front of JDK bin in the path.

          Generally speaking JDK is not supposed to be used to run webstart or applets. It is good for development (compilation) but to execute
          webstart or applet it is expected that user has JRE installed.