public static void premain(String agentArgs,Instrumentation inst){
  instrumentation=inst;
  LOGGER.info("inspectIT Agent: Starting initialization...");
  checkForCorrectSetup();
  try {
    @SuppressWarnings("resource") InspectItClassLoader classLoader=new InspectItClassLoader(new URL[0]);
    Class<?> agentClazz=classLoader.loadClass(INSPECTIT_AGENT);
    Constructor<?> constructor=agentClazz.getConstructor(File.class);
    Object realAgent=constructor.newInstance(getInspectItAgentJarFileLocation());
    Agent.agent=(IAgent)realAgent;
    preloadClasses();
    LOGGER.info("inspectIT Agent: Initialization complete...");
    analyzeAlreadyLoadedClasses();
    inst.addTransformer(new JavaAgent());
  }
 catch (  Exception e) {
    LOGGER.severe("Something unexpected happened while trying to initialize the Agent, aborting!");
    e.printStackTrace();
  }
}

public static void premain ( String agentArgs , Instrumentation inst ) { instrumentation = inst ; LOGGER . info ( "inspectIT Agent: Starting initialization..." ) ; checkForCorrectSetup ( ) ; try { @ SuppressWarnings ( "resource" ) InspectItClassLoader classLoader = new InspectItClassLoader ( new URL [ 0 ] ) ; Class < ? > agentClazz = classLoader . loadClass ( INSPECTIT_AGENT ) ; Constructor < ? > constructor = agentClazz . getConstructor ( File . class ) ; Object realAgent = constructor . newInstance ( getInspectItAgentJarFileLocation ( ) ) ; Agent . agent = ( IAgent ) realAgent ; preloadClasses ( ) ; LOGGER . info ( "inspectIT Agent: Initialization complete..." ) ; analyzeAlreadyLoadedClasses ( ) ; inst . addTransformer ( new JavaAgent ( ) ) ; } catch ( Exception e ) { LOGGER . severe ( "Something unexpected happened while trying to initialize the Agent, aborting!" ) ; e . printStackTrace ( ) ; } }
the premain method will be executed before anything else .
