jmockit: Native library for Attach API not available in this JRE error

前端 未结 7 1840
时光取名叫无心
时光取名叫无心 2020-12-30 00:32

I was trying to use jmockit to unit test my project and got the following error:

java.lang.UnsatisfiedLinkError: no attach in java.library.path
java.lang.Ill         


        
7条回答
  •  不思量自难忘°
    2020-12-30 01:09

    Dao Lam, Here are some other things to try:

    • Make sure your project is using either:
      • The workspace default (That assumes that the default is your the jdk installation you just added. From the window where you added it, make sure it is checked.),
      • The jdk version, or
      • An execution Environment that uses the jdk version.
    • Pull up your system's environment variables, and add this path to it: (jdk_dir)/jre/bin. (Remember, you'll have to restart Eclipse once you've saved that to get it to take).
    • Close eclipse, and modify the shortcut you are using to start it to use (jdk_dir)/jre/bin.

    I've found that any one of these measures will allow Eclipse to find the attach.dll.

提交回复
热议问题