Class GhidraClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
ghidra.GhidraClassLoader
- All Implemented Interfaces:
Closeable, AutoCloseable
Custom Ghidra URL class loader which exposes the addURL method so we can add to the classpath
at runtime.
This class loader must be installed by setting the "java.system.class.loader" system property prior to launch (i.e., the JVM should be launched with the following argument: -Djava.system.class.loader=ghidra.GhidraClassLoader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe classpath system property:java.class.pathstatic final StringThe extensions classpath system property:java.class.path.extstatic final StringWhen 'true', this property will trigger the system to put each Extension module's lib jar files into theCP_EXTproperty. -
Constructor Summary
ConstructorsConstructorDescriptionGhidraClassLoader(ClassLoader parent) This one-argument constructor is required for the JVM to successfully use this class loader via the java.system.class.loader system property. -
Method Summary
Methods inherited from class URLClassLoader
close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class SecureClassLoader
defineClass, defineClassMethods inherited from class ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
ENABLE_RESTRICTED_EXTENSIONS_PROPERTY
-
CP
-
CP_EXT
The extensions classpath system property:java.class.path.ext- See Also:
-
-
Constructor Details
-
GhidraClassLoader
This one-argument constructor is required for the JVM to successfully use this class loader via the java.system.class.loader system property.- Parameters:
parent- The parent class loader for delegation
-
-
Method Details
-
getClasspath
-
addURL
- Overrides:
addURLin classURLClassLoader
-
addPath
-