6888546: restore System.initializeSystemClasses
authormchung
Fri, 17 Sep 2010 14:16:14 -0700
changeset 6668 bf6309ced0b6
parent 6667 3e631ea81f40
child 6669 8f8d4d5768ae
6888546: restore System.initializeSystemClasses Summary: restore System.initializeSystemClasses prior to fix for 6797688 Reviewed-by: alanb
jdk/src/share/classes/java/lang/System.java
--- a/jdk/src/share/classes/java/lang/System.java	Fri Sep 17 13:33:40 2010 -0400
+++ b/jdk/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() {