eclipse打开报failed to load the jni shared library错误的解决办法

这种问题一般出现在电脑重装了jdk之后出现的,现在给出解决办法:

首先查询自己已经安装的eclipse是多少位的,32还是64位的,查看方法为到eclipse安装目录下的eclipse.ini文件

如下图所示:

打开后的配置文件为:

-startup

plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

--launcher.library

plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130521-0416

-product

org.eclipse.epp.package.cpp.product

--launcher.defaultAction

openFile

--launcher.XXMaxPermSize
256M

-showsplash

org.eclipse.platform

--launcher.XXMaxPermSize
256m

--launcher.defaultAction

openFile

-vm

D:\Program Files\jdk1.8 32\jre\bin\javaw.exe
--launcher.appendVmargs

-vmargs

-Dosgi.requiredJavaVersion=1.8

-Xms40m

-Xmx512m
以上,其中如下图箭头所示位置可以看出,是一个32位的

 

 但是我的电脑目前已经安装了jdk1.8 64位的,且不想重新卸载,因为我还有idea要运行,解决的办法是到官网上下载一个jdk1.8 32位的,下载好后安装到单独的一个目录中,

单独的目录结构为如下所示:

我将32位的jdk1.8和jre都装在一个文件夹下,

然后在eclipse配置文件的eclipse.ini中,找到如下位置

 将-vm后面的路径设置成你安装好的jdk 32位的位置,然后-Dosgi.requiredJavaVersion=1.8记得要设置是1.8的,如果你安装其他版本的,也要改成其他的版本号,保存配置文件,此时eclipseJ就可以正常打开了

 

 

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 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
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值