eclipse报错Failed to load the JNI shared library 等问题的解决方法

eclipse报错Failed to load the JNI shared library等问题的解决方法

 

Eclipse 是基于 Java 的可扩展开发平台,所以安装 Eclipse 前你需要确保你的电脑已安装 JDK,Eclipse 的安装非常简单,Eclipse IDE官网:https://www.eclipse.org/downloads/ ,建议你下载压缩包版本(点击 Download Packages链接),官网下载时可能会跳转到一个需要你付费的页面,并不是eclipse需要付费,这只是请求你捐钱的,可以不管,解压完毕后即可使用,进入文件夹,红框如图所示就是eclipse的启动程序。

eclipse常见问题及处理

1、eclipse安装(对于可执行安装版而言)或运行(对于压缩包版本而然)报错:Failed to load the JNI shared library 解决方法

 

 

 

首先查看JDK是否安装成功:window +R  打开 cmd,运行 java -version ,参见下图:

若出现以上情况即表示JDK安装成功。

 

JDK和eclipse是否相位数匹配【两者都为32位  或者  两者都为64位】,如果位数已经匹配,仍然报错,可能是版本不匹配可以如下处理:

找到eclipse的安装路径下的 eclipse.ini 文件

 

 

打开eclipse.ini 文件,加入-vm和JDK安装文件javaw.exe包括路径的全名两行 :

-vm

D:\BlueJ-windows-422\bluej\jdk\bin\javaw.exe

【注:我的 D:\BlueJ-windows-422\bluej\jdk\bin\javaw.exe下划线部分为,按你的实际情况改动,若有上述两行,可实际情况改动修改】

注意添加的位置。参见下图:

 

2、eclipse读入UTF-8中文txt文件中文乱码的解决方法

原因:eclipse默认文本格式是gbk格式,将eclipse文本格式改为UTF-8就显示正确了,操作:右击 项目(project)名 → 属性(properties),将eclipse文本格式改为UTF-8,参见下图:

 

 

 

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
This error message typically occurs when a Java program is unable to load the Java Native Interface (JNI) shared library. The JNI is a programming framework that allows Java programs to interact with native applications and libraries written in languages such as C and C++. Here are some possible reasons for this error: 1. Missing or incorrect library path: The JVM may not be able to find the JNI library because the library path is not set correctly or the library file is missing. 2. Wrong architecture: The JVM may be trying to load a JNI library that is not compatible with the architecture of the system. For example, if the JVM is 64-bit and the JNI library is 32-bit, it will not be able to load the library. 3. Incompatible Java version: The JNI library may not be compatible with the version of Java that is installed on the system. 4. Corrupted library file: The JNI library file may be corrupted, which can prevent it from loading correctly. To resolve this error, you can try the following: 1. Check the library path: Ensure that the library path is set correctly and that the JNI library file exists in the path. 2. Check the architecture: Ensure that the JNI library file is compatible with the architecture of the system. 3. Check the Java version: Ensure that the version of Java installed on the system is compatible with the JNI library. 4. Reinstall the library: Try reinstalling the JNI library to ensure that it is not corrupted. If none of these solutions work, you may need to consult the documentation for the specific Java program you are using or contact the developer for further assistance.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

学习&实践爱好者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值