JDK-6793429 : Use compiled properties instead of plain properties for resource file
  • Type: Enhancement
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-01-14
  • Updated: 2011-07-15
  • Resolved: 2011-07-15
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
7 b46Fixed
Related Reports
Relates :  
Relates :  
Description
sun.launcher.LauncherHelp class is added in JDK 7. It has a resource properties file.  The java launcher to load the resource bundle from a properties file is slower than loading from a java class.  We shall use the compiled properties instead.

In 1.4.2, the JRE has been fixed to use compiled properties files. See 4747351: Compile .properties files into .class files.

Comments
SUGGESTED FIX make/common/internal/Resources.gmk *** 42,57 **** # are added automatically. For Java files, use a format suitable for inclusion # in the FILES_java list; dito for properties, all relative paths. # # NEW_RESOURCE_BUNDLES_JAVA - new resource bundles implemented in # Java, not localized - # NEW_RESOURCE_BUNDLES_PROPERTIES - new resource bundles implemented as - # properties files, not localized # RESOURCE_BUNDLES_JAVA - resource bundles implemented in # Java, localized - # RESOURCE_BUNDLES_PROPERTIES - new resource bundles implemented as - # properties files, localized # # The following variable is now used for most .properties files in the JDK. # These properties files are converted into java and compiled with javac. # The resulting .class files are usually smaller and are always faster to load. # The relative path to the properties file becomes a relative path to a --- 42,53 ---- *** 59,68 **** --- 55,71 ---- # # RESOURCE_BUNDLES_COMPILED_PROPERTIES - resource bundles implemented as # properties files, localized # NEW_RESOURCE_BUNDLES_COMPILED_PROPERTIES - same as above, not localized # + # For non-compiled properties files, use the following variables: + # + # NEW_RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES - new resource bundles implemented as + # properties files, not localized + # RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES - new resource bundles implemented as + # properties files, localized + # # Other properties files to be installed are identified using the variable: # # OTHER_PROPERTIES # *** 107,121 **** # Add to java sources list FILES_java += $(COMPILED_PROPERTIES:%.properties=%.java) # Non-compiled files ! PROPERTIES_FILES += $(NEW_RESOURCE_BUNDLES_PROPERTIES) ! PROPERTIES_FILES += $(RESOURCE_BUNDLES_PROPERTIES) \ ! $(foreach file,$(RESOURCE_BUNDLES_PROPERTIES), \ $(foreach locale,$(LOCALE_SUFFIXES), \ $(basename $(file))_$(locale)$(suffix $(file)))) PROPERTIES_FILES += $(OTHER_PROPERTIES) # # Compile Properties tool # --- 110,125 ---- # Add to java sources list FILES_java += $(COMPILED_PROPERTIES:%.properties=%.java) # Non-compiled files ! PROPERTIES_FILES += $(NEW_RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES) ! PROPERTIES_FILES += $(RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES) \ ! $(foreach file,$(RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES), \ $(foreach locale,$(LOCALE_SUFFIXES), \ $(basename $(file))_$(locale)$(suffix $(file)))) + # other properties PROPERTIES_FILES += $(OTHER_PROPERTIES) Also, update the following Makefile to use the renamed variable for the non-compiled properties and change the java launcher to use compiled properties. make/com/sun/org/apache/xml/Makefile make/com/sun/rowset/Makefile make/sun/launcher/Makefile make/sun/rmi/oldtools/Makefile make/sun/rmi/registry/Makefile make/sun/rmi/rmic/Makefile make/sun/rmi/rmid/Makefile make/sun/serialver/Makefile
22-01-2009

EVALUATION The default for any JRE resource properties should use the compiled properties.
14-01-2009