自己写的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上了。

Error: A JNI error has occurred, please check your installation and try again的更多相关文章

  1. idea 运行scala代码 报错:Exception in thread "main" java.lang.NoClassDefFoundError: scala/Predef$ java.lang.NoClassDefFoundError: scala/Function0 Error: A JNI error has occurred, please check your installati

    各种报错信息如下: java.lang.NoClassDefFoundError: scala/Function0 at java.lang.Class.getDeclaredMethods0(Nat ...

  2. Eclipse 运行导入的 Java 项目时,Error:A JNI error has occurred

    出现场景 导入 Java 项目,运行时,出现:Error:A JNI error has occurred.... 解决方式 该项目的 Build Path , 在Libraries 中删除后重新添加 ...

  3. 使用java命令出现Error: A JNI error has occurred, please check your installation and try again的错误

    运行Java程序,javac运行.java文件没有报错,但java运行的时候报错 ​​​ 仔细看一下报错 Exception in thread "main" java.lang. ...

  4. Hadoop格式化namenode 出错 Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/security/authorize/Refr

    一般是修改配置文件:etc/hadoop/hadoop-env.sh的时候出现的错误 export JAVA_HOME=/usr/jdk export HADOOP_COMMON_HOME=~/had ...

  5. Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)

    公司一SQL Server镜像发生了故障转移(主备切换),检查SQL Server镜像发生主备切换的原因,在错误日志中发现下面错误: Date        2019/8/31 14:09:17   ...

  6. error: C++ preprocessor "/lib/cpp" fails sanity check

    在安装protobuf,知悉./Configure时候报错“error: C++ preprocessor "/lib/cpp" fails sanity check” 下面是转载 ...

  7. java virtual machine launcher Error:Could not create the Java Virtual Machine. Error:A Fatal exception has occurred,Program will exit.

    Error:Could not create the Java Virtual Machine. Error:A Fatal exception has occurred,Program will e ...

  8. error: C++ preprocessor "/lib/cpp" fails sanity check错误解决方法

    error: C++ preprocessor "/lib/cpp" fails sanity check 问题的解决 问题的根源是缺少必要的C++库.如果是CentOS系统,运行 ...

  9. 解决:org.apache.tomcat.jni.Error: 70023: This function has not been implemented on this platform

    centos7.3 启动tomcat 出现错误: 八月 08, 2017 4:58:47 下午 org.apache.catalina.core.StandardEngine startInterna ...

随机推荐

  1. 一个数字键盘引发的血案——移动端H5输入框、光标、数字键盘全假套件实现

    https://juejin.im/post/5a44c5eef265da432d2868f6 为啥要写假键盘? 还是输入框.光标全假的假键盘? 手机自带的不用非得写个假的,吃饱没事干吧? 装逼?炫技 ...

  2. 【debian】给用户添加sudo权限

    新装的debian系统默认是没有sudo功能的. 于是,在root用户权限下: apt-get install sudo 然后再修改文件 /etc/sudoers : chmod +w /etc/su ...

  3. 存储器的保护(三)——《x86汇编语言:从实模式到保护模式》读书笔记20

    存储器的保护(三) 修改本章代码清单,使之可以检测1MB以上的内存空间(从地址0x0010_0000开始,不考虑高速缓存的影响).要求:对内存的读写按双字的长度进行,并在检测的同时显示已检测的内存数量 ...

  4. Android OpenGL教程-第二课【转】

    第二课 你的第一个多边形: 在第一个教程的基础上,我们添加了一个三角形和一个四边形.也许你认为这很简单,但你已经迈出了一大步,要知道任何在OpenGL中绘制的模型都会被分解为这两种简单的图形. 读完了 ...

  5. 查询数据库的所有列信息 sys.all_columns

    一.Database.sys.tables 为每个表对象返回一行,当前仅用于 sys.objects.type = U 的表对象. 列名 数据类型 说明 <继承的列>   有关此视图所继承 ...

  6. Why Isn't curr_items Decreasing When Items Expire?

    Why Isn't curr_items Decreasing When Items Expire?

  7. vs2017启动调试,点击浏览器或输入后回车浏览器闪退,调试中断

    vs2017在启动调试后,浏览器运行,点击地址栏刚输入几个字符,mmmmm居然闪退了! 什么情况呢?测试一下,换其他浏览器进行调试,偶尔不会有问题, 可是第二天......还是一下 于是浏览器——ww ...

  8. 自己玩虚拟机上mongo备份

    rs.initiate({_id:"shard1RS",members:[{_id:1,host:"127.0.0.1:27018",priority:2},{ ...

  9. Intellij IDEA 各种乱码解决方案 posted @ 2017-06-23 15:31:06

    一次解决所有问题,只需做配置文件的修改即可 解决方案:       在      IntelliJ IDEA 2016.1\bin\idea64.exe.vmoptions        Intell ...

  10. 在CentOS 7下更改yum源与更新系统

    在CentOS 7下更改yum源与更新系统. [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo cp /etc/yum.repos.d/CentOS-Base.rep ...