diff -r a78533d1bbc6 -r f51518b30c84 jdk/src/share/classes/sun/misc/VM.java --- a/jdk/src/share/classes/sun/misc/VM.java Fri Oct 21 18:01:01 2011 +0900 +++ b/jdk/src/share/classes/sun/misc/VM.java Mon Oct 24 20:55:08 2011 +0100 @@ -371,6 +371,12 @@ private final static int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010; private final static int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020; + /* + * Returns the first non-null class loader up the execution stack, + * or null if only code from the null class loader is on the stack. + */ + public static native ClassLoader latestUserDefinedLoader(); + static { initialize(); }