JDK-7072674 : System property deployment.jpi.mode.new is not set correctly
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2011-07-29
  • Updated: 2013-09-12
  • Resolved: 2011-10-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u2 b08Fixed 8Fixed
Description
FULL PRODUCT VERSION :
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Installed Java 1.6.0_26-b03
Afterwards installed Java 1.7.0-b147

A DESCRIPTION OF THE PROBLEM :
After installing Java 1.7.0 (additionally to and after 1.6.0_26) the browser will use Java plugin version 1.7.0 / 10.0.0.147 to run applets. When the applet specifies a family JRE version like 1.6.0 the plugin correctly uses the latest installed 1.6.0 JRE to run that applet. However, the following can be observed in this scenario (scenario 1):

Scenario 1:
1. Java Console says:
Java-Plug-in 10.0.0.147
JRE-Version 1.6.0_26-b03
(correct)
2. Pressing "s" in the Java console to print the deployment properties displays deployment.jpi.mode.new = true
(which is correct - the new plugin2 is set to be used in the Java Control Panel).
3. If the applet executes System.getProperty("deployment.jpi.mode.new") this returns null! (and thus reading the value via Boolean.getBoolean returns false)
=> bug

Scenario 2:
If one disables the next-generation Java plugin in Java 1.7 then Java 1.6.0_26 is used for executing the applet (per the applet's JRE family version setting). However, if the applet executes System.getProperty("deployment.jpi.mode.new") this returns true! (which is obviously incorrect)

The browser (IE8) has been restarted after changing the setting for next-generation Java plugin usage.


REGRESSION.  Last worked in version 6u26

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see above.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Scenario 1: System.getProperty("deployment.jpi.mode.new") should return "true" (instead of null)
Scenario 2: System.getProperty("deployment.jpi.mode.new") should return "false" (instead of "true")

ACTUAL -
Scenario 1: System.getProperty("deployment.jpi.mode.new") returns null
Scenario 2: System.getProperty("deployment.jpi.mode.new") returns "true"


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
/*
 * Run this applet with the following class-id to request to be executed by JRE 1.6. The system to run the applet should have 1.6 >= 1.6.0_10 and 1.7.0 installed.
 */
public class TestApplet extends java.applet.Applet {
  public TestApplet() {
 ��}
  
  public void init() {
    System.out.println("deployment.jpi.mode.new=" + System.getProperty("deployment.jpi.mode.new"));
  }
  public void start() {
  }
}
---------- END SOURCE ----------

Comments
EVALUATION When calling Config.getStringProperty() from ClientConfig.init(), the static method of Config doesn't have an instance of Config set yet. What we really want to have is the property in ClientConfig. getProperty() is already String type, which is what should be used.
16-09-2011