Java Eclipse - 无法加载 JNI 共享库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19894100/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 21:06:36  来源:igfitidea点击:

Eclipse - Failed to load the JNI shared library

javaeclipsejvmjava-native-interface

提问by virhonestum

Every time I try to start Eclipse, it says

每次我尝试启动 Eclipse 时,它​​都会说

Failed to load the JNI shared libraby "C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll"

无法加载 JNI 共享库“C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll”

I have no clue why this happens, because I reinstalled JDK, JRE and Eclipse multiple times. All the 64 bit version (I've got Windows 7 64 bit)

我不知道为什么会发生这种情况,因为我多次重新安装了 JDK、JRE 和 Eclipse。所有 64 位版本(我有 Windows 7 64 位)

采纳答案by virhonestum

Alright, it somehow worked using the 32 Bit version of Eclipse...

好吧,它以某种方式使用 32 位版本的 Eclipse 工作......

回答by yushulx

If you have installed all 64 bit version of Eclipse and JDK, you can check your system environment variable. Probably you set on old JAVA_HOME path pointing to

如果您已经安装了所有 64 位版本的 Eclipse 和 JDK,您可以检查您的系统环境变量。可能您设置了指向的旧 JAVA_HOME 路径

"C:\Program Files (x86)\Java"

“C:\Program Files (x86)\Java”

回答by DropAndTrap

Just try to downloadthis if you have 64 bit OS windows.Hope it will work :)

如果您有 64 位操作系统 windows,请尝试下载它。希望它会起作用:)

回答by karokir

I had the same problem: in my case everything was in fact 64-bit - 64-bit OS, 64-bit Eclipse and 64-bit JRE in use, so there was some confusion as to the origins of the issue...

我遇到了同样的问题:在我的情况下,实际上一切都是 64 位 - 64 位操作系统、64 位 Eclipse 和 64 位 JRE 正在使用中,因此对于问题的起源存在一些混淆......

What helped was correcting environmental variables JAVA_HOME and PATH - and pointing them directly to

帮助纠正环境变量 JAVA_HOME 和 PATH - 并将它们直接指向

.../My/Java/Location/bin

instead of

代替

.../My/Java/Location

回答by Subba Reddy

If eclipse is 32bit then, eclipse.ini file specify -vm C:\Program Files (x86)\Java\jre\bin\javaw.exe

如果 Eclipse 是 32 位,则 eclipse.ini 文件指定 -vm C:\Program Files (x86)\Java\jre\bin\javaw.exe

If eclipse is 64bit then, eclipse.ini file specify -vm C:\Program Files\Java\jdk\jre\bin\javaw.exe

如果 Eclipse 是 64 位,则 eclipse.ini 文件指定 -vm C:\Program Files\Java\jdk\jre\bin\javaw.exe

Summary: specify compatible java version path ( 32 bit or 64 bit ). -vm %JAVA_HOME%\jre\bin\javaw.exe

总结:指定兼容的 java 版本路径(32 位或 64 位)。-vm %JAVA_HOME%\jre\bin\javaw.exe