hotspot/src/share/vm/prims/jvm.cpp
changeset 1388 3677f5f3d66b
parent 1374 4c24294029a9
parent 781 e1baa9c8f16f
child 1420 d116726a4ca4
equal deleted inserted replaced
1387:580d4ae0a776 1388:3677f5f3d66b
     1 /*
     1 /*
     2  * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   626 JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls))
   626 JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls))
   627   JVMWrapper("JVM_ResolveClass");
   627   JVMWrapper("JVM_ResolveClass");
   628   if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
   628   if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
   629 JVM_END
   629 JVM_END
   630 
   630 
       
   631 // Rationale behind JVM_FindClassFromBootLoader
       
   632 // a> JVM_FindClassFromClassLoader was never exported in the export tables.
       
   633 // b> because of (a) java.dll has a direct dependecy on the  unexported
       
   634 //    private symbol "_JVM_FindClassFromClassLoader@20".
       
   635 // c> the launcher cannot use the private symbol as it dynamically opens
       
   636 //    the entry point, so if something changes, the launcher will fail
       
   637 //    unexpectedly at runtime, it is safest for the launcher to dlopen a
       
   638 //    stable exported interface.
       
   639 // d> re-exporting JVM_FindClassFromClassLoader as public, will cause its
       
   640 //    signature to change from _JVM_FindClassFromClassLoader@20 to
       
   641 //    JVM_FindClassFromClassLoader and will not be backward compatible
       
   642 //    with older JDKs.
       
   643 // Thus a public/stable exported entry point is the right solution,
       
   644 // public here means public in linker semantics, and is exported only
       
   645 // to the JDK, and is not intended to be a public API.
       
   646 
       
   647 JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
       
   648                                               const char* name,
       
   649                                               jboolean throwError))
       
   650   JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name,
       
   651               throwError ? "error" : "exception");
       
   652   return JVM_FindClassFromClassLoader(env, name, JNI_FALSE,
       
   653                                       (jobject)NULL, throwError);
       
   654 JVM_END
   631 
   655 
   632 JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
   656 JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
   633                                                jboolean init, jobject loader,
   657                                                jboolean init, jobject loader,
   634                                                jboolean throwError))
   658                                                jboolean throwError))
   635   JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name,
   659   JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name,