public final class ToolsClassFinder extends Object
| Modifier and Type | Method and Description |
|---|---|
static Class |
lookupClass(String pClassName)
Lookup a class and return its definition.
|
static Class |
lookupInToolsJar(String pClassName)
Searches for
tools.jar in various locations and uses an URLClassLoader for
loading a class from this files. |
public static Class lookupClass(String pClassName) throws ClassNotFoundException
pClassName - class name to lookupClassNotFoundException - if no class could be foundpublic static Class lookupInToolsJar(String pClassName) throws ClassNotFoundException
tools.jar in various locations and uses an URLClassLoader for
loading a class from this files. If the class could not be found in any, then a ClassNotFoundException
is thrown. The locations used for lookup are (in this order)
$JAVA_HOME here is the value of the system property java.homepClassName - class to lookupClassNotFoundException - if no class could be foundCopyright © 2015. All rights reserved.