title: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
body: <p>I get <code>AttachNotSupportedException</code>  while running jmockit tests on linux (ubuntu 64bit). Java version is 1.7.0_51. This  JDK is from Oracle. Tests are run using ant(that probably is not relevant)</p>
  
  <p>See the stack trace.</p>
  
  <pre><code>[junit] 
  [junit] java.lang.RuntimeException: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
  [junit]     at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:89)
  [junit]     at mockit.internal.startup.JDK6AgentLoader.loadAgent(JDK6AgentLoader.java:54)
  [junit]     at mockit.internal.startup.AgentInitialization.initializeAccordingToJDKVersion(AgentInitialization.java:21)
  [junit]     at mockit.internal.startup.Startup.initializeIfNeeded(Startup.java:136)
  [junit]     at mockit.internal.startup.Startup.initializeIfPossible(Startup.java:169)
  [junit]     at junit.framework.TestResult.&lt;clinit&gt;(TestResult.java:15)
  [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:356)
  [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
  [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
  [junit] Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
  [junit]     at sun.tools.attach.LinuxVirtualMachine.&lt;init&gt;(LinuxVirtualMachine.java:106)
  [junit]     at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:79)
  [junit]     ... 8 more
  [junit] Exception in thread "main" java.lang.ExceptionInInitializerError
  [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:356)
  [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
  [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
  [junit] Caused by: java.lang.RuntimeException: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
  [junit]     at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:89)
  [junit]     at mockit.internal.startup.JDK6AgentLoader.loadAgent(JDK6AgentLoader.java:54)
  [junit]     at mockit.internal.startup.AgentInitialization.initializeAccordingToJDKVersion(AgentInitialization.java:21)
  [junit]     at mockit.internal.startup.Startup.initializeIfNeeded(Startup.java:136)
  [junit]     at mockit.internal.startup.Startup.initializeIfPossible(Startup.java:169)
  [junit]     at junit.framework.TestResult.&lt;clinit&gt;(TestResult.java:15)
  [junit]     ... 3 more
  [junit] Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
  [junit]     at sun.tools.attach.LinuxVirtualMachine.&lt;init&gt;(LinuxVirtualMachine.java:106)
  [junit]     at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:79)
  [junit]     ... 8 more
  [junit] Running chs.caf.cap
  </code></pre>
  
  <p>It appears to be related to <a href="https://stackoverflow.com/questions/12205354/attachnotsupportedexception-while-running-jmockit-tests-on-ibm-jre">AttachNotSupportedException while running jMockit tests on IBM JRE</a>. This however is on IBM jre.</p>