United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7072674 : System property deployment.jpi.mode.new is not set correctly

Details
Type:
Bug
Submit Date:
2011-07-29
Status:
Closed
Updated Date:
2013-03-07
Project Name:
JDK
Resolved Date:
2011-10-19
Component:
deploy
OS:
windows_xp
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u2 (b08)

Related Reports
Backport:

Sub Tasks

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
regression_test_src: http://sqe-hgi.us.oracle.com/hg/index.cgi/8/deployment_int_ws/rev/57da1f140056
                                     
2013-03-07
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.
                                     
2011-09-16



Hardware and Software, Engineered to Work Together