private Class lookupVirtualMachineClass ( ) { try { return ToolsClassFinder . lookupClass ( "com.sun.tools.attach.VirtualMachine" ) ; } catch ( ClassNotFoundException exp ) { throw new ProcessingException ( "Cannot find classes from tools.jar. The heuristics for loading tools.jar which contains\n" + "essential classes for attaching to a running JVM could locate the necessary jar file.\n" + "\n" + "Please call this launcher with a qualified classpath on the command line like\n" + "\n" + " java -cp path/to/tools.jar:" + options . getJarFileName ( ) + " org.jolokia.jvmagent.client.AgentLauncher [options] <command> <ppid>\n" , exp , options ) ; } }
lookup virtual machine class