public class SystemClassLoader extends EnvironmentClassLoader implements EnvironmentBean
java -Djava.system.class.loader=com.caucho.loader.SystemClassLoader ...If the system property "system.conf" is defined, it is used as a path to a configuration file that initializes the enviornment. Relative paths are relative to the current directory (See
Vfs.getPwd()
.
Resources defined in system.conf are available to all classes loaded within the jvm.
java -Dsystem.conf=tests/system.conf -Djava.system.class.loader=com.caucho.loader.SystemClassLoader ...
Constructor and Description |
---|
SystemClassLoader(java.lang.ClassLoader parent)
Creates a new SystemClassLoader.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
findLibrary(java.lang.String name)
Returns the full library path for the name.
|
java.lang.ClassLoader |
getClassLoader() |
protected java.lang.String |
getSchema() |
void |
init()
Initialize the environment.
|
protected void |
initEnvironment() |
boolean |
isJarCacheEnabled()
Returns true if jar entries should be cached.
|
boolean |
isRoot() |
java.lang.Class<?> |
loadClassImpl(java.lang.String name,
boolean resolve)
Load a class using this class loader
|
addListener, addLoaderListener, addScanListener, addScanPackage, addScanRoot, addURL, applyVisibleModules, buildImportClassPath, configureEnhancerEvent, configurePostEnhancerEvent, create, create, create, create, createArtifactManager, destroy, findImportClass, getAdmin, getArtifactManager, getAttribute, getConfigException, getEnvironmentListeners, getHash, getImportResource, getLoaderListeners, getOwner, getResource, getResourceAlias, getResourceAsStream, isActive, putIfAbsent, putResourceAlias, removeAttribute, removeListener, scan, setAttribute, setConfigException, setOwner, start, stop, toString, validate
addCodeBasePath, addDependency, addJar, addJarManifestClassPath, addListener, addLoader, addLoader, addManifestClassPath, addNative, addParentPriorityPackage, addParentPriorityPackages, addPathClass, addPermission, addPermission, addPermissions, addPriorityPackage, addRoot, addTransformer, addURL, addURL, appendToClassPathForInstrumentation, buildClassPath, buildResourcePathSpecificFirst, buildSourcePath, clearModified, containsURL, containsURL, definePackage, findClass, findClassImpl, findPath, findResources, getClassEntry, getClassPath, getDependencyCheckInterval, getGlobalDependencyCheckInterval, getHash, getHashCrc, getId, getInstrumentableClassLoader, getListeners, getLoaders, getLocalClassPath, getNewTempClassLoader, getPermissions, getPermissions, getResourcePathSpecificFirst, getResources, getSourcePath, getThrowawayClassLoader, getTransformerList, getURLs, isDestroyed, isDirectoryLoader, isDisableURLs, isJarCacheEnabledDefault, isModified, isModified, isModified, isModifiedNow, loadClass, loadClass, loadClass, loadClassEntry, logModified, make, removeListener, removeLoader, replace, resetDependencyCheckInterval, sendAddLoaderEvent, setDependencyCheckInterval, setDisableURLs, setEnableDependencyCheck, setGlobalDependencyCheckInterval, setId, setJarCacheEnabled, setOldLoader, setServletHack, toClassPath, updateScan
close, definePackage, findResource, newInstance, newInstance
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public SystemClassLoader(java.lang.ClassLoader parent)
public boolean isJarCacheEnabled()
DynamicClassLoader
isJarCacheEnabled
in class DynamicClassLoader
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface EnvironmentBean
public boolean isRoot()
isRoot
in class DynamicClassLoader
public void init()
EnvironmentClassLoader
init
in class EnvironmentClassLoader
protected void initEnvironment()
initEnvironment
in class EnvironmentClassLoader
public java.lang.Class<?> loadClassImpl(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
loadClassImpl
in class DynamicClassLoader
name
- the classname to loadresolve
- if true, resolve the classjava.lang.ClassNotFoundException
protected java.lang.String getSchema()
public java.lang.String findLibrary(java.lang.String name)
findLibrary
in class DynamicClassLoader