/** * Create a new jar file for the sole purpose of specifying an Agent-Class * to load into the JVM. * * @return absolute path to the new jar file. */ private static String createAgentJar() throws IOException { File file = File.createTempFile(InstrumentationFactory.class.getName(), ".jar"); file.deleteOnExit(); ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(file)); zout.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF")); PrintWriter writer = new PrintWriter(new OutputStreamWriter(zout)); writer .println("Agent-Class: " + InstrumentationFactory.class.getName()); writer.println("Can-Redefine-Classes: true"); // IBM doesn't support retransform writer.println("Can-Retransform-Classes: " + Boolean.toString(JavaVendors.getCurrentVendor().isIBM() == false)); writer.close(); return file.getAbsolutePath(); }
/** * Create a new jar file for the sole purpose of specifying an Agent-Class * to load into the JVM. * * @return absolute path to the new jar file. */ private static String createAgentJar() throws IOException { File file = File.createTempFile(InstrumentationFactory.class.getName(), ".jar"); file.deleteOnExit(); ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(file)); zout.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF")); PrintWriter writer = new PrintWriter(new OutputStreamWriter(zout)); writer .println("Agent-Class: " + InstrumentationFactory.class.getName()); writer.println("Can-Redefine-Classes: true"); // IBM doesn't support retransform writer.println("Can-Retransform-Classes: " + Boolean.toString(JavaVendors.getCurrentVendor().isIBM() == false)); writer.close(); return file.getAbsolutePath(); }
/** * Create a new jar file for the sole purpose of specifying an Agent-Class * to load into the JVM. * * @return absolute path to the new jar file. */ private static String createAgentJar() throws IOException { File file = File.createTempFile(InstrumentationFactory.class.getName(), ".jar"); file.deleteOnExit(); ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(file)); zout.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF")); PrintWriter writer = new PrintWriter(new OutputStreamWriter(zout)); writer .println("Agent-Class: " + InstrumentationFactory.class.getName()); writer.println("Can-Redefine-Classes: true"); // IBM doesn't support retransform writer.println("Can-Retransform-Classes: " + Boolean.toString(JavaVendors.getCurrentVendor().isIBM() == false)); writer.close(); return file.getAbsolutePath(); }
/** * Create a new jar file for the sole purpose of specifying an Agent-Class * to load into the JVM. * * @return absolute path to the new jar file. */ private static String createAgentJar() throws IOException { File file = File.createTempFile(InstrumentationFactory.class.getName(), ".jar"); file.deleteOnExit(); ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(file)); zout.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF")); PrintWriter writer = new PrintWriter(new OutputStreamWriter(zout)); writer .println("Agent-Class: " + InstrumentationFactory.class.getName()); writer.println("Can-Redefine-Classes: true"); // IBM doesn't support retransform writer.println("Can-Retransform-Classes: " + Boolean.toString(JavaVendors.getCurrentVendor().isIBM() == false)); writer.close(); return file.getAbsolutePath(); }
return null; JavaVendors vendor = JavaVendors.getCurrentVendor(); File toolsJar = null;
return null; JavaVendors vendor = JavaVendors.getCurrentVendor(); File toolsJar = null;
return null; JavaVendors vendor = JavaVendors.getCurrentVendor(); File toolsJar = null;
return null; JavaVendors vendor = JavaVendors.getCurrentVendor(); File toolsJar = null;