1. 程式人生 > >TestNG執行報錯:Error: A JNI error has occurred

TestNG執行報錯:Error: A JNI error has occurred

第一次執行testNG,發現報錯:Error: A JNI error has occurred . Please check your installation and try again.

追根究底,就是jar包不完整的原因。匯入jcommander-1.48.jar包後執行,沒有再提示此錯誤。

另外,在testNG中還會經常使用到另外一個jar包,testng-6.8.21.jar,包含了org.testng.CommandLineArgs,org.testng.annotations.*等類,可一同加入。