I get AttachNotSupportedException while running jmockit tests on linux (ubuntu 64bit). Java version is 1.7.0_51. This JDK is from Oracle. Tests are run using
I also got a similar problem when tried to check for Thread Deadlock. You can also use the command jcmd Thread.print to print the thread dump on the console and check if the program has a deadlock. You can check my answer with steps on Deadlock detection in Java