JDK-6728782 : deployment properties for Java Plug-in are disregarded in system level deployment properties file
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u7
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-07-23
  • Updated: 2010-07-29
  • Resolved: 2009-01-14
Description
Java Plug-in related deployment properties are disregarded in the system level 
deployment properties file.

The problem is strictly reproducible on 1.6.0_03 and 1.6.0_07.

1. Config setup
---------------
1.1 files
---------
I used the following "deployment.config" and "deployment.properties" files.
(Please find these attached to this bug report as well.)
The files were placed in directory C:\WINDOWS\Sun\Java\Deployment.

deployment.CONFIG
-----------------
deployment.system.config=file\:////c\:/WINDOWS/Sun/Java/Deployment/deployment.properties
deployment.system.config.mandatory=true

deployment.PROPERTIES
---------------------
#deployment.properties
deployment.console.startup.mode=SHOW
deployment.trace=true
deployment.log=true
deployment.trace.level=all
#Java Plugin jre's
deployment.javapi.jre.1.6.0_07.path=c\:\\jre1.6.0_07
deployment.javapi.jre.1.6.0_07.osarch=x86
deployment.javapi.jre.1.6.0_07.args=-Xmx128m
deployment.javapi.jre.1.6.0_07.osname=Windows


1.2 properties
--------------
The "deployment.properties" file contains a mix of general deployment properties
and Java Plug-in specific deployment properties.

General deployment properties:
------------------------------
deployment.console.startup.mode=SHOW
deployment.trace=true
deployment.log=true
deployment.trace.level=all

Java Plug-in specific deployment properties:
--------------------------------------------
deployment.javapi.jre.1.6.0_07.path=c\:\\jre1.6.0_07
deployment.javapi.jre.1.6.0_07.osarch=x86
deployment.javapi.jre.1.6.0_07.args=-Xmx128m
deployment.javapi.jre.1.6.0_07.osname=Windows


2. Java Plug-in
---------------
2.1 w/o user level "deployment.properties" file
-----------------------------------------------
I order to exclude overlay effects, the user level "deployment.properties" 
file in C:\Documents and Settings\<user>\Application Data\Sun\Java\Deployment
was deleted.

Starting an arbitrary Java applet and looking at the system properties in the 
Java Console window, shows, that "-Xmx" values was left unchanged.

Here is what was recorded in the trace log:
C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\log
> findstr Xmx plugin65295.trace
javaplugin.vm.options = -Djava.class.path=C:\JRE16~1.0_0\classes -Xbootclasspath
/a:C:\JRE16~1.0_0\lib\deploy.jar;C:\JRE16~1.0_0\lib\plugin.jar -Xmx96m -Djavaplu
gin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.6.0_07 -Djavaplugin.n
odotversion=160_07 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\
JRE16~1.0_0
deployment.javapi.jre.1.6.0_07.args = -Xmx128m

Please note: the jre arg "-Xmx128m" was not picked up by "javaplugin.vm.options".


2.2 w/ user level "deployment.properties" file
----------------------------------------------
In order to get a user level "deployment.properties" file, the "Java Control Panel"
was started and the following configuration was made:
-> Java -> Java Applet Runtime Settings: View ->
add "-Xmx128m" to the "Java Runtime Parameters" column and press "OK" and leave
"Java Control Panel" by pressing "OK".
A user level properties file will be written.

Starting an arbitrary Java applet and looking at the system properties in the 
Java Console window, shows, that the "-Xmx128m" value was added to
"javaplugin.vm.options" at the end of the line, overwriting the previous
"-Xmx96m" value.

Here is what was recorded in the trace log:
C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\log
> findstr Xmx plugin58299.trace
javaplugin.vm.options = -Djava.class.path=C:\JRE16~1.0_0\classes -Xbootclasspath
/a:C:\JRE16~1.0_0\lib\deploy.jar;C:\JRE16~1.0_0\lib\plugin.jar -Xmx96m -Djavaplu
gin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.6.0_07 -Djavaplugin.n
odotversion=160_07 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\
JRE16~1.0_0 -Xmx128m
deployment.javapi.jre.1.6.0_07.args = -Xmx128m

2.3 general deployment properties
---------------------------------
The general deployment properties appear to be working fine as can be seen on the
detailed trace.


2.4 experimental data attached
------------------------------
Please find attached the following files retrieved by the experiment:
deployment.properties.user: user level deployment.properties file as created in 2.2
plugin51981.trace: trace file created in 2.1 (w/o user level deployment.properties file)
plugin58299.trace: trace file created in 2.2 (w/ user level deployment.properties file)

Comments
EVALUATION Tested with 6u14 b01. System level deployment configuration is working in the new java Plug-in. We are not going to fix it for the old plugin. Close the CR as not reproducible in new plugin.
14-01-2009

EVALUATION The system level deployment configuration is a feature for java webstart. It has not been used in java plug-in. Since 6u10, the same jre selection mechanism is used for both new java plugin and java webstart. This makes it possible for new plugin to adapt the system levle configuration. Mark this CR as a RFE and lowever priority to medium.
22-12-2008

WORK AROUND The following could serve as a workaround to the problem: "How to configure a property (e.g. Xmx) globally on a Windows PC ?" This however is not specfic to certain components like Java Plugin or Java Web Start. Open Windows Control Panel: Advanced -> Environment Variables -> System Variables -> New Variable name: _JAVA_OPTIONS Variable value: -Xmx256m #(for example) Close all windows pressing OK Upon restart of "Internet Explorer" the configuration will be active. The configuration will affect all Java programs: both the launcher "java.exe" and Java Web Start "javaws.exe" and the Java Plugin as it is launched by a browser.
28-10-2008