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上了。
Error: A JNI error has occurred, please check your installation and try again的更多相关文章
- 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 ...
- Eclipse 运行导入的 Java 项目时,Error:A JNI error has occurred
出现场景 导入 Java 项目,运行时,出现:Error:A JNI error has occurred.... 解决方式 该项目的 Build Path , 在Libraries 中删除后重新添加 ...
- 使用java命令出现Error: A JNI error has occurred, please check your installation and try again的错误
运行Java程序,javac运行.java文件没有报错,但java运行的时候报错 仔细看一下报错 Exception in thread "main" java.lang. ...
- 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 ...
- 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 ...
- error: C++ preprocessor "/lib/cpp" fails sanity check
在安装protobuf,知悉./Configure时候报错“error: C++ preprocessor "/lib/cpp" fails sanity check” 下面是转载 ...
- 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 ...
- error: C++ preprocessor "/lib/cpp" fails sanity check错误解决方法
error: C++ preprocessor "/lib/cpp" fails sanity check 问题的解决 问题的根源是缺少必要的C++库.如果是CentOS系统,运行 ...
- 解决: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 ...
随机推荐
- Oracle给Select结果集加锁,Skip Locked(跳过加锁行获得可以加锁的结果集)
1.通过select for update或select for update wait或select for update nowait给数据集加锁 具体实现参考select for update和 ...
- android httpclient 上传图片
需要依赖 httpmime.jar /** * 上传图片 * * @param url * 上传地址 * @param filepath * 图片路径 * @return */ public Str ...
- Android创建定时和周期任务
问题:应用需要按时执行某个操作,例如定时更新UI. 解决方案:使用Handler提供的定时操作功能.通过Handler,可以在指定的时间或是指定的延时后执行操作. 下面看一个在TextView中显示当 ...
- PHP的parse_ini_file()函数,解释结构类型php.ini格式的文件
1.直接读取,返回一维数组 如: "test.ini" 的内容: [names] me = Robert you = Peter [urls] first = "http ...
- Dictionary<string, object>不区分大小写
Dictionary<string, object> dic = new Dictionary<string, object>(StringComparer.OrdinalIg ...
- 查找正序排列的List中缺失的日期数据的一个算法
Code: public List<DateTime> getMissDateData() { DateTime[] keys = { DateTime.Now.AddDays(-5), ...
- [android] 天气app布局练习(四)
主要练习一下获取网络数据和解析xml MainActivity.java package com.example.weatherreport; import java.io.UnsupportedEn ...
- spring和springboot常用注解总结
@ConfigurationProperties 可以非常方便的把资源文件中的内容绑定到对象上 @Value("${app.name}") 注入简单值 @Import 通过导入 ...
- Java-----思想认识
1.1 Java封装性思想的初步理解 从项目需求的角度出发,建立各个模块化的类,各个模块暂时不需要具体的方法描述,只需要各个模块的理想到位. 以银行项目为例.初步设想需要三个模块:银行(Bank类). ...
- Cardinality Estimation算法学习(二)(Linear Counting算法、最大似然估计(MLE))
在上篇,我了解了基数的基本概念,现在进入Linear Counting算法的学习. 理解颇浅,还请大神指点! http://blog.codinglabs.org/articles/algorithm ...