changeset 2799:605b327f4830

6888546: restore System.initializeSystemClasses Summary: restore System.initializeSystemClasses prior to fix for 6797688 Reviewed-by: alanb
author mchung
date Fri, 17 Sep 2010 14:16:14 -0700
parents 291a5c52f9d0
children 48d7f8c4cd60
files src/share/classes/java/lang/System.java
diffstat 1 files changed, 7 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/lang/System.java	Fri Sep 17 13:33:40 2010 -0400
+++ b/src/share/classes/java/lang/System.java	Fri Sep 17 14:16:14 2010 -0700
@@ -1101,22 +1101,12 @@
         lineSeparator = props.getProperty("line.separator");
         sun.misc.Version.init();
 
-        // Workaround until DownloadManager initialization is revisited.
-        // Make JavaLangAccess available early enough for internal
-        // Shutdown hooks to be registered
-        setJavaLangAccess();
-
         // Gets and removes system properties that configure the Integer
         // cache used to support the object identity semantics of autoboxing.
         // At this time, the size of the cache may be controlled by the
         // vm option -XX:AutoBoxCacheMax=<size>.
         Integer.getAndRemoveCacheProperties();
 
-        // Load the zip library now in order to keep java.util.zip.ZipFile
-        // from trying to use itself to load this library later.
-        loadLibrary("zip");
-
-
         FileInputStream fdIn = new FileInputStream(FileDescriptor.in);
         FileOutputStream fdOut = new FileOutputStream(FileDescriptor.out);
         FileOutputStream fdErr = new FileOutputStream(FileDescriptor.err);
@@ -1124,6 +1114,10 @@
         setOut0(new PrintStream(new BufferedOutputStream(fdOut, 128), true));
         setErr0(new PrintStream(new BufferedOutputStream(fdErr, 128), true));
 
+        // Load the zip library now in order to keep java.util.zip.ZipFile
+        // from trying to use itself to load this library later.
+        loadLibrary("zip");
+
         // Setup Java signal handlers for HUP, TERM, and INT (where available).
         Terminator.setup();
 
@@ -1153,6 +1147,9 @@
         // way as other threads; we must do it ourselves here.
         Thread current = Thread.currentThread();
         current.getThreadGroup().add(current);
+
+        // register shared secrets
+        setJavaLangAccess();
     }
 
     private static void setJavaLangAccess() {