Error: A JNI error has occurred, please check your installation and try again


自己写的maven项目打包以后的一个email测试类jar,放到linux上运行时报错:
Error: A JNI error has occurred, please check your installation and try again

原因是在Pom.xml中写入的jar,在Linux上缺少,解决方法是将pom.xml中的jar放到Linux上,运行是通过-cp加载上去,比如:

 java -cp javax.mail-1.6.1.jar:TestModule-0.0.1-SNAPSHOT.jar com.aliyun.mayun.SendMail

就是将javax.mail-1.6.1.jar:TestModule-0.0.1-SNAPSHOT直接手动加载到jvm上了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM