![](/img/trans.png)
[英]Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process [ERROR] Cannot instantiate class
[英]There was an error in the forked prpcess org/apache/commons/io/FileUtils org.apache.maven.surefire.booter.SurefireBooterForkException
當我嘗試執行 mvn test 命令時,出現此錯誤。 它編譯工作正常。 我的代碼運行良好我曾經通過 Eclipse 上的 Test-NG 套件運行此程序,但在命令提示符下嘗試通過 maven 運行此程序時出錯...您的幫助將不勝感激,並提前致謝。[請找到截圖鏈接下面的錯誤:-]
我通過在 pom.xml 中添加 commons-io 依賴項解決了這個錯誤:-`
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
`
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.