public static File createTemporaryAgentJar(final String agentClass,final String bootClassPath,final boolean canRedefineClasses,final boolean canRetransformClasses,final boolean canSetNativeMethodPrefix) throws IOException {
  final File jarFile=File.createTempFile("javaagent." + agentClass,".jar");
  jarFile.deleteOnExit();
  createAgentJar(new FileOutputStream(jarFile),agentClass,bootClassPath,canRedefineClasses,canRetransformClasses,canSetNativeMethodPrefix);
  return jarFile;
}

public static File createTemporaryAgentJar ( final String agentClass , final String bootClassPath , final boolean canRedefineClasses , final boolean canRetransformClasses , final boolean canSetNativeMethodPrefix ) throws IOException { final File jarFile = File . createTempFile ( "javaagent." + agentClass , ".jar" ) ; jarFile . deleteOnExit ( ) ; createAgentJar ( new FileOutputStream ( jarFile ) , agentClass , bootClassPath , canRedefineClasses , canRetransformClasses , canSetNativeMethodPrefix ) ; return jarFile ; }
creates a jar in runtime with the proper manifest file to start the javaagent . < p / > this method is convenient to java agent developers since they can test their agents without creating a jar first .
