com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded

后端 未结 4 1254
野的像风
野的像风 2020-12-08 22:42

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

4条回答
  •  再見小時候
    2020-12-08 23:32

    Like @bbarker, I got the same error but on JDK 1.8.0_161 using the Linux subsystem in Windows 10 ("Bash on Ubuntu on Windows"). Configuring the Surefire plugin with the JVM argument mentioned above fixed the issue for me as well:

        
            org.apache.maven.plugins
            maven-surefire-plugin
            2.21.0
            
                -XX:+StartAttachListener
            
        
    

    Running the tests from a "normal" Windows command prompt works without the above, though.

提交回复
热议问题