Lookup and create a {@link com.sun.tools.attach.VirtualMachine} via reflection. First, a directlookup via {@link Class#forName(String)} is done, which will succeed for JVM on OS X, since tools.jaris bundled there together with classes.zip. Next, tools.jar is tried to be found (by examine java.home) and an own classloader is created for looking up the VirtualMachine. If lookup fails, a message is printed out (except when '--quiet' is provided)
@return the create virtual machine of null if none could be created
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.