Skip to content

EA Agent Loader is a collection of utilities for java agent developers.

License

Notifications You must be signed in to change notification settings

LinkedInAttic/agent-loader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Loader

Project Forked

This is a fork of EA's Agent Loader which is deprecated and no longer accepts contributions.

We've made minor changes to it for our needs; this is not a general purpose fork.

Project Deprecated

With the introduction of JDK9, dynamically self attaching Java Agents is considered bad practice. As such we are deprecating this project and will no longer continue to maintain it. The project remains here for reference and for JDK8 users.

Brief

Agent Loader is a collection of utilities for java agent developers. It allows programmers to write and test their java agents using dynamic agent loading (without using the -javaagent jvm parameter).

Developer & License

This project was developed by Electronic Arts and is licensed under the BSD 3-Clause License.

This fork includes minor changes by LinkedIn and those changes are licensed under the BSD 2-Clause License.

Example

public class HelloAgentWorld
{
    public static class HelloAgent
    {
        public static void agentmain(String agentArgs, Instrumentation inst)
        {
            System.out.println(agentArgs);
            System.out.println("Hi from the agent!");
            System.out.println("I've got instrumentation!: " + inst);
        }
    }

    public static void main(String[] args)
    {
        AgentLoader.loadAgentClass(HelloAgent.class.getName(), "Hello!");
    }
}

About

EA Agent Loader is a collection of utilities for java agent developers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%