--- old/src/macosx/classes/sun/font/CFontManager.java 2014-04-17 15:30:48.000000000 +0400 +++ new/src/macosx/classes/sun/font/CFontManager.java 2014-04-17 15:30:48.000000000 +0400 @@ -40,7 +40,7 @@ import sun.awt.FontConfiguration; import sun.awt.HeadlessToolkit; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import sun.lwawt.macosx.*; public class CFontManager extends SunFontManager { --- old/src/macosx/classes/sun/lwawt/LWToolkit.java 2014-04-17 15:30:49.000000000 +0400 +++ new/src/macosx/classes/sun/lwawt/LWToolkit.java 2014-04-17 15:30:49.000000000 +0400 @@ -35,7 +35,7 @@ import sun.awt.*; import sun.print.*; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import static sun.lwawt.LWWindowPeer.PeerType; --- old/src/macosx/native/sun/awt/awt.m 2014-04-17 15:30:50.000000000 +0400 +++ new/src/macosx/native/sun/awt/awt.m 2014-04-17 15:30:50.000000000 +0400 @@ -435,7 +435,7 @@ forceEmbeddedMode = YES; } JNIEnv* env = [ThreadUtilities getJNIEnvUncached]; - jclass jc_ThreadGroupUtils = (*env)->FindClass(env, "sun/misc/ThreadGroupUtils"); + jclass jc_ThreadGroupUtils = (*env)->FindClass(env, "sun/awt/util/ThreadGroupUtils"); jmethodID sjm_getRootThreadGroup = (*env)->GetStaticMethodID(env, jc_ThreadGroupUtils, "getRootThreadGroup", "()Ljava/lang/ThreadGroup;"); jobject rootThreadGroup = (*env)->CallStaticObjectMethod(env, jc_ThreadGroupUtils, sjm_getRootThreadGroup); [ThreadUtilities setAppkitThreadGroup:(*env)->NewGlobalRef(env, rootThreadGroup)]; --- old/src/share/classes/sun/awt/AWTAutoShutdown.java 2014-04-17 15:30:51.000000000 +0400 +++ new/src/share/classes/sun/awt/AWTAutoShutdown.java 2014-04-17 15:30:51.000000000 +0400 @@ -35,7 +35,7 @@ import java.util.Set; import sun.util.logging.PlatformLogger; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; /** * This class is to let AWT shutdown automatically when a user is done --- old/src/share/classes/sun/font/CreatedFontTracker.java 2014-04-17 15:30:52.000000000 +0400 +++ new/src/share/classes/sun/font/CreatedFontTracker.java 2014-04-17 15:30:52.000000000 +0400 @@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit; import sun.awt.AppContext; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; public class CreatedFontTracker { --- old/src/share/classes/sun/font/SunFontManager.java 2014-04-17 15:30:53.000000000 +0400 +++ new/src/share/classes/sun/font/SunFontManager.java 2014-04-17 15:30:53.000000000 +0400 @@ -52,7 +52,7 @@ import sun.awt.AppContext; import sun.awt.FontConfiguration; import sun.awt.SunToolkit; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import sun.java2d.FontSupport; import sun.util.logging.PlatformLogger; --- old/src/share/classes/sun/java2d/Disposer.java 2014-04-17 15:30:54.000000000 +0400 +++ new/src/share/classes/sun/java2d/Disposer.java 2014-04-17 15:30:54.000000000 +0400 @@ -25,7 +25,7 @@ package sun.java2d; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; --- old/src/share/classes/sun/java2d/opengl/OGLRenderQueue.java 2014-04-17 15:30:55.000000000 +0400 +++ new/src/share/classes/sun/java2d/opengl/OGLRenderQueue.java 2014-04-17 15:30:54.000000000 +0400 @@ -25,7 +25,7 @@ package sun.java2d.opengl; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import sun.java2d.pipe.RenderBuffer; import sun.java2d.pipe.RenderQueue; import static sun.java2d.pipe.BufferedOpCodes.*; --- old/src/solaris/classes/sun/awt/X11/XToolkit.java 2014-04-17 15:30:55.000000000 +0400 +++ new/src/solaris/classes/sun/awt/X11/XToolkit.java 2014-04-17 15:30:55.000000000 +0400 @@ -51,7 +51,7 @@ import sun.font.FontConfigManager; import sun.java2d.SunGraphicsEnvironment; import sun.misc.*; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import sun.print.PrintJob2D; import sun.security.action.GetPropertyAction; import sun.security.action.GetBooleanAction; --- old/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2014-04-17 15:30:56.000000000 +0400 +++ new/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2014-04-17 15:30:56.000000000 +0400 @@ -42,7 +42,7 @@ import sun.java2d.xr.XRGraphicsConfig; import sun.java2d.loops.SurfaceType; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; /** * This is an implementation of a GraphicsDevice object for a single --- old/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java 2014-04-17 15:30:57.000000000 +0400 +++ new/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java 2014-04-17 15:30:57.000000000 +0400 @@ -39,7 +39,7 @@ import static sun.awt.shell.Win32ShellFolder2.*; import sun.awt.OSInfo; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; // NOTE: This class supersedes Win32ShellFolderManager, which was removed // from distribution after version 1.4.2. --- old/src/windows/classes/sun/awt/windows/WToolkit.java 2014-04-17 15:30:58.000000000 +0400 +++ new/src/windows/classes/sun/awt/windows/WToolkit.java 2014-04-17 15:30:58.000000000 +0400 @@ -40,7 +40,7 @@ import sun.awt.AWTPermissions; import sun.awt.LightweightFrame; import sun.awt.SunToolkit; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import sun.awt.Win32GraphicsDevice; import sun.awt.Win32GraphicsEnvironment; import sun.awt.datatransfer.DataTransferer; --- old/src/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java 2014-04-17 15:30:59.000000000 +0400 +++ new/src/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java 2014-04-17 15:30:59.000000000 +0400 @@ -38,7 +38,7 @@ import java.util.HashMap; import sun.awt.AWTAccessor; -import sun.misc.ThreadGroupUtils; +import sun.awt.util.ThreadGroupUtils; import sun.awt.Win32GraphicsConfig; import sun.awt.windows.WComponentPeer; import sun.java2d.InvalidPipeException; --- old/src/share/classes/sun/misc/ThreadGroupUtils.java 2014-04-17 15:31:00.000000000 +0400 +++ /dev/null 2014-04-17 15:31:00.000000000 +0400 @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.misc; - -/** - * A utility class needed to access the root {@code ThreadGroup} - * - * The class should not depend on any others, because it' called from JNI_OnLoad of the AWT - * native library. Triggering class loading could could lead to a deadlock. - */ -public final class ThreadGroupUtils { - - private ThreadGroupUtils() { - // Avoid instantiation - } - - /** - * Returns a root thread group. - * Should be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION} - * - * @return a root {@code ThreadGroup} - */ - public static ThreadGroup getRootThreadGroup() { - ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); - ThreadGroup parentTG = currentTG.getParent(); - while (parentTG != null) { - currentTG = parentTG; - parentTG = currentTG.getParent(); - } - return currentTG; - } -} --- /dev/null 2014-04-17 15:31:00.000000000 +0400 +++ new/src/share/classes/sun/awt/util/ThreadGroupUtils.java 2014-04-17 15:31:00.000000000 +0400 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.awt.util; + +/** + * A utility class needed to access the root {@code ThreadGroup} + * + * The class should not depend on any others, because it' called from JNI_OnLoad of the AWT + * native library. Triggering class loading could lead to a deadlock. + */ +public final class ThreadGroupUtils { + + private ThreadGroupUtils() { + // Avoid instantiation + } + + /** + * Returns a root thread group. + * Should be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION} + * + * @return a root {@code ThreadGroup} + */ + public static ThreadGroup getRootThreadGroup() { + ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); + ThreadGroup parentTG = currentTG.getParent(); + while (parentTG != null) { + currentTG = parentTG; + parentTG = currentTG.getParent(); + } + return currentTG; + } +}