testng测试报错:java.lang.UnsatisfiedLinkError: no attach in java.library.path解决方案
2017-09-29 10:28
1106 查看
1、报错信息
2、报错原因::java.lang.UnsatisfiedLinkError: no attach in java.library.path
3、解决方案:右键单击>Run As > Run Configurations 选择存在的的JRE包,点击Run即可;若没有JRE包可选,点击Install JREs添加,点击Ok ,再点击Run即可。
![](https://oscdn.geek-share.com/Uploads/Images/Content/201908/20/f74bc45609479784e1ae837a0fc776e6)
java.lang.IllegalStateException: Native library for Attach API not available in this JRE Caused by: java.lang.UnsatisfiedLinkError: no attach in java.library.path [TestNG] Running: C:\Users\liangzhicheng\AppData\Local\Temp\testng-eclipse--1609936300\testng-customsuite.xml FAILED: testAdd java.lang.IllegalStateException: Native library for Attach API not available in this JRE Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.WindowsVirtualMachine FAILED: testCountSSubjectBlockItem java.lang.IllegalStateException: Native library for Attach API not available in this JRE Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.WindowsVirtualMachine FAILED: testDelete java.lang.IllegalStateException: Native library for Attach API not available in this JRE Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.WindowsVirtualMachine FAILED: testGet java.lang.IllegalStateException: Native library for Attach API not available in this JRE Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.WindowsVirtualMachine FAILED: testGetList java.lang.IllegalStateException: Native library for Attach API not available in this JRE Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.WindowsVirtualMachine FAILED: testUpdate java.lang.IllegalStateException: Native library for Attach API not available in this JRE Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.WindowsVirtualMachine =============================================== Default test Tests run: 6, Failures: 6, Skips: 0 =============================================== =============================================== Default suite Total tests run: 6, Failures: 6, Skips: 0 =============================================== [TestNG] Time taken by org.testng.reporters.XMLReporter@5700d6b1: 12 ms [TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@598067a5: 25 ms [TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 6 ms [TestNG] Time taken by org.testng.reporters.JUnitReportReporter@72d818d1: 10 ms [TestNG] Time taken by org.testng.reporters.EmailableReporter2@1e397ed7: 9 ms [TestNG] Time taken by org.testng.reporters.jq.Main@553f17c: 41 ms
2、报错原因::java.lang.UnsatisfiedLinkError: no attach in java.library.path
3、解决方案:右键单击>Run As > Run Configurations 选择存在的的JRE包,点击Run即可;若没有JRE包可选,点击Install JREs添加,点击Ok ,再点击Run即可。
相关文章推荐
- java.lang.UnsatisfiedLinkError: no jacob in java.library.path解决方案
- java.lang.UnsatisfiedLinkError: no XX in java.library.path解决方法
- 使用Snappy 压缩方式报错“java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path”
- java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
- java.lang.UnsatisfiedLinkError: no jacob in java.library.path
- java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
- java.lang.UnsatisfiedLinkError: no resin_os in java.library.path
- java.lang.UnsatisfiedLinkError: no jacob-1.14-x86 in java.library.path
- java.lang.UnsatisfiedLinkError: no XXX in java.library.path
- 空间展示应用的java.lang.UnsatisfiedLinkError:no orgal in java.library.path错误解决方法
- java.lang.UnsatisfiedLinkError: no msc64 in java.library.path
- java.lang.UnsatisfiedLinkError: no jacob-1.17-x86 in java.library.path
- java.lang.UnsatisfiedLinkError: no XXX in java.library.path
- java.lang.UnsatisfiedLinkError: no jcom in java.library.path
- firefox升级后SWT程序错误(java.lang.UnsatisfiedLinkError: no swt-mozilla-gtk-3349 or swt-mozilla-gtk in swt.library.path, java.library.p
- java.lang.UnsatisfiedLinkError: no webp-imageio in java.library.path
- java.lang.UnsatisfiedLinkError: no XXX in java.library.path .
- java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading g
- no jpeg in java.library.path;java.lang.NoClassDefFoundError: Could not initialize class sun.awt.image.codec.JPEGImageEncoderImpl
- java.lang.UnsatisfiedLinkError: no jacob in java.library.path