Public Member Functions | |
AcsSystemClassLoader (ClassLoader parent) | |
Static Public Attributes | |
final String | PROPERTY_JARDIRS = "acs.system.classpath.jardirs" |
final String | PROPERTY_TOPJARSONLY = "acs.system.classpath.topjarsonly" |
final String | PROPERTY_CLASSLOADERVERBOSE = "acs.system.classloader.verbose" |
Protected Member Functions | |
synchronized Class<?> | loadClass (String name, boolean resolve) throws ClassNotFoundException |
Class<?> | findClass (String name) throws ClassNotFoundException |
Private Member Functions | |
File[] | parseJarDirs (String jarDirPath) |
void | prependCLASSPATHJars (List< File > jarFileList) |
void | appendToClassPathForInstrumentation (String jarPathName) |
Private Attributes | |
boolean | verbose |
final JarOrderOptimizer | optimizer |
final URLClassLoader | appClassLoader |
The main purpose is to cut down the very long classpath produced otherwise by the ACS start scripts. Only the jar file that contains this class loader must be supplied to the JVM using the "-classpath" option. The JVM must be started with property definitions similar to:
-Djava.system.class.loader=alma.acs.classloading.AcsSystemClassLoader
. -Dacs.system.classpath.jardirs=../lib/:$INTROOT/lib:$ACSROOT/lib
. If an operating system has a native style path separator different from "<code>:</code>", it can optionally be used instead. URLClassLoader
. java.system.class.loader
. sun.misc.Launcher$AppClassLoader
) as the parent, since ACS 6.0 this CL takes over the functionality of the direct parent, and uses the original grandparent CL for parent-delegation. Circumventing the original parent CL after copying its CLASSPATH entries, removes the distinction between the CLASSPATH entries and the jar files from the acs.system.classpath.jardirs
directories. ../lib/ACScomponents
are not picked up by the classloader unless we add them to the CLASSPATH, e.g. using acsStartJava -addToClasspath
. sun.misc.Launcher$AppClassLoader
. This allows JUnit tests run, since the JUnit framework sets up their own classloader to be a child of the system classloader, shortcutting any "regular" child class loaders in between.
|
Constructor will be called by the JVM. The standard system class loader (instance of
In the ctor, the directories given in
|
|
This method, even though private, allows jconsole and possibly similar profilers and other tools to add their required jar files, see java.lang.instrument.Instrumentation#appendToSystemClassLoaderSearch(java.util.jar.JarFile)}.
For example, jconsole would currently call this method with argument
|
|
Delegates to base class implementation.
Discards requests to load classes from certain sub-packages of |
|
|
|
|
|
Extracts the CLASSPATH jar files (or directories) from the parent class loader and adds them at the beginning of the given list.
It is assumed that thanks to the |
|
|
|
|
|
|
|
|
|
|
|
|