Why does using the Java Attach API fail on linux? (even though maven build completes)
I've been using the Java Attach API (part of tools.jar) to attach to a running java process, and shut it down from within. It works perfectly on Windows. However when trying to actually execute the attach code when running on linux I get a java.lang.NoClassDefFoundError with the following stack trace for the cause... java.lang.ClassNotFoundException:com.sun.tools.attach.VirtualMachine... java.net.URLClassLoader$1.run(URLClassLoader.java:202) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:190) java.lang.ClassLoader.loadClass