Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8022953

Environment is not correctly passed when WebStart spawns a secondary process

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version " 1.7.0_40-ea "
      Java(TM) SE Runtime Environment (build 1.7.0_40-ea-b36)
      Java HotSpot(TM) Client VM (build 24.0-b55, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      My look & feel and other settings are not correctly recognised when launching a Java 6 application through Java 7 webstart.

      REGRESSION. Last worked in version 7u25

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Create a small test program that displays the Look & Feel
      2. Deploy in a signed jar
      3. Create a small JNLP file that explicitly sets the default look & feel to com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel and has j2se version = 1.6
      4. Ensure that you have both JRE 6 and JRE 1.7.0_40-ea-b36 installed
      5. Enable " Show Console " in the Java Control panel
      6. Launch the web start file
      7. Observe the output in the console
      6.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The console should display
      [Nimbus Look and Feel - com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel]
      ACTUAL -
      The console displays
      [The Microsoft Windows Look and Feel - com.sun.java.swing.plaf.windows.WindowsLookAndFeel]

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      test.jnlp
      -----------

      <?xml version= " 1.0 " encoding= " utf-8 " ?>
      <jnlp spec= " 6.0+ " codebase= " http://www.example.com/webstart " href= " test.jnlp " >
        <information>
          <title>Test</title>
          <vendor>Example</vendor>
        </information>
        <resources>
          <j2se version= " 1.6 " initial-heap-size= " 64m " max-heap-size= " 384m " java-vm-args= " -ea " />
          <jar href= " test.jar " main= " true " />
          <property name= " swing.defaultlaf " value= " com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel " />
        </resources>
        <application-desc main-class= " Test " />
      </jnlp>

      Test.java
      ------------
      public class Test {
        public static void main(String... argv) throws Exception {
          System.out.println(javax.swing.UIManager.getLookAndFeel());
        }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Specify j2se version= " 1.6+ " instead of j2se version= " 1.6 " , thus allowing the application to run from the " primary " process.

            vdrozdov Victor Drozdov (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: