Package org.kohsuke.file_leak_detector
Class Main
- java.lang.Object
-
- org.kohsuke.file_leak_detector.Main
-
public class Main extends Object
Entry point for externally attaching agent into another local process.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
void
run()
protected ClassLoader
wrapIntoClassLoader(File toolsJar)
Figures out how to load tools.jar into a classloader.
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
run
public void run() throws IOException, ReflectiveOperationException
-
wrapIntoClassLoader
protected ClassLoader wrapIntoClassLoader(File toolsJar) throws MalformedURLException
Figures out how to load tools.jar into a classloader. The attachment API relies on JNI, so if we have other processes in the JVM that tries to use the attach API (like JavaMelody), it'll cause a failure. So we try to load tools.jar into the application classloadr so that later attempts to load tools.jar will see it.- Throws:
MalformedURLException
-
-