Package com.avrix.agent
Class AgentLoader
java.lang.Object
com.avrix.agent.AgentLoader
The AgentLoader class provides a method for loading an agent into a running virtual machine (JVM).
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
AgentLoader
public AgentLoader()
-
-
Method Details
-
loadAgent
The loadAgent method loads the agent into the current JVM if it is not already loaded. To load the agent, the tools.jar library and classes from thecom.sun.tools.attach
package are used. The path to the agent JAR file is determined from the location of theLauncher
class that called the loadAgent method. The resulting path is passed to the loadAgent method of theVirtualMachine
class to load the agent. After the agent is loaded, the detach method is called to detach from the virtual machine.- Parameters:
agentJarPath
- path to the Jar file with this agent
-
loadAgent
public static void loadAgent()The loadAgent method loads the agent into the current JVM if it is not already loaded. To load the agent, the tools.jar library and classes from thecom.sun.tools.attach
package are used. The path to the agent JAR file is determined from the location of theLauncher
class that called the loadAgent method. The resulting path is passed to the loadAgent method of theVirtualMachine
class to load the agent. After the agent is loaded, the detach method is called to detach from the virtual machine.
-