code

JDK (JNI 공유 라이브러리)를로드하지 못했습니다.

codestyles 2020. 9. 28. 09:10
반응형

JDK (JNI 공유 라이브러리)를로드하지 못했습니다.


Eclipse를 열려고 하면 팝업 대화 상자가 다음과 같이 표시됩니다.

JNI 공유 라이브러리 "C : /JDK/bin/client/jvm.dll"`을로드하지 못했습니다.

이 후 Eclipse 강제 종료됩니다.

제가 말씀 드리고 싶은 몇 가지 사항은 다음과 같습니다.

  • 그 경로에 무엇이 있는지 확인했습니다. 존재합니다.
  • My Eclipse와 Java SE Development Kit 는 모두 64 비트입니다. 시스템을 확인한 결과 64 비트를 처리 할 수 ​​있습니다.
  • Google과 Stack Overflow에서이 문제를 검색했는데 내가 찾은 유일한 대답은 JDK 및 Eclipse의 32 비트 버전을 다운로드하는 것입니다.

32 비트 버전을 다운로드하는 것은 마지막 수단으로 만하고 싶은 작업입니다.
이 문제를 해결하려면 무엇을 제안해야합니까?


64-bit트리오 가 필요합니다 .

  • 64-bit OS
  • 64-bit 자바
  • 64-bit

OS, JDK 및 Eclipse의 작동 쌍 :


  • 32-bit OS | 32-bit JDK | 32-bit Eclipse ( 32 비트 전용 )
  • 64-bit OS | 32-bit JDK | 32-bit
  • 64-bit OS | 64-bit JDK| 64bit Eclipse ( 64 비트 전용 )

여러 JDK와 JRE를 설치했습니다.

그들 각각은 PATH 변수에 자신의 항목을 가지고 있었고 모두 다소간 작동했습니다.

PATH 변수를 고려할 때 일부 설치는 사용되지 않았기 때문에 완전히 쓸모가 없었습니다. 물론 "비활성"Java는 필요한 경우 Eclipse 내에서 수동으로 참조 할 수 있지만 그렇게하지 않았기 때문에 실제로 필요하지 않았습니다. (적어도 그 당시에는 그렇게 생각했습니다 ...)

나는 엉망진창을 정리하고 모든 현재 Java를 제거하고 JDK + JRE 1.7 64 비트 만 설치했습니다.

나중에 Eclipse '설치'중 하나가 실패한 Failed to Load the JNI shared Library것으로 생각되는 새로 설치된 JDK에 상대적인 경로와 함께 jvm.dll.

실패한 Eclipse는 내 모든 64 비트 설정에서 여전히 32 비트 버전 인 모든 IDE 중 하나였습니다.

자주 언급했듯이 VM 인수를 추가 eclipse.ini하는 것은 내 경우에는 쓸모가 없었습니다 (관련 할 JDK / JRE 만 잘못 되었기 때문입니다).

또한이 Eclipse가 32 비트 또는 64 비트 버전인지 확인하는 방법을 찾을 수 없었습니다 ( 이 Eclipse '설치'가 시작되지 않기 때문에 작업 관리자 에서 찾을 수 없었 습니다. 설정 한 지 오래되어 버전도 기억 나지 않습니다.)

최신 JDK 및 이전 JRE 를 사용하는 경우 문제가 발생할 수도 있지만 IIRCjava.lang.UnsupportedClassVersionError 가 나타날 가능성이 더 큽니다 .


eclipse.ini파일에 다음 행이 포함되어 있는지 확인하십시오 .

-vm
C:\path\to\64bit\java\bin\javaw.exe

eclipse.ini예 :

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jdk1.6.0_32\bin\javaw.exe
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

OS와 Eclipse를 모두 64 비트 또는 32 비트 모두 동일하게 유지하고 config 사용하십시오 eclipse.ini.

귀하의 eclipse.ini파일은 이클립스 폴더에서 찾을 수 있습니다 .


나는 같은 문제가 있었다

64 비트 JVM을 설치하여 해결했습니다.

http://www.java.com/en/download/manual.jsp


이 오류는 Eclipse의 아키텍처가 Java 런타임의 아키텍처와 일치하지 않음을 의미합니다. 즉, 하나가 32 비트 인 경우 다른 하나는 64 비트가 아니라 동일해야합니다.

가장 안정적인 수정은 eclipse.ini에서 JVM 위치를 지정하는 것입니다.

-vm
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javaw.exe

Important: These two lines must come before -vmargs. Do not use quotes; spaces are allowed.


Another option is:

Create a shortcut to the Eclipse.exe. Open the shortcut and change the target to:

"C:\Program Files\eclipse\eclipse.exe" -vm "c:\Program Files\Java\jdk1.7.0_04\bin\javaw.exe"

For your installation, make sure the locations point to the correct Eclipse installation directory and the correct javaw.exe installation directory.

(The 64/32 bit versions of Eclipse and Java need to be the same, of course.)


I have multiple versions of Java installed, both Sun JDK & JRockit, both 32 bit and 64-bit, etc. and ran into this problem with a fresh install of 64-bit Eclipse for Java EE (JUNO).

What did NOT work:

64-bit trio as suggested by Peter Rader:

I'm using 64-bit Eclipse on 64-bit OS (Windows 7).

I ensured Sun JDK 7 64-bit was the default java version. When I typed "java -version" from command line (cmd.exe), Sun JDK 7 64-bit was returned...

java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

This did not resolve the problem for me.

What DID work:

Adding -vm option to eclipse.ini as suggested by Jayesh Kavathiya:

I added the following to eclipse.ini:

-vm
C:/apps/java/jdk7-64bit/bin/javaw.exe

Note:

I did not have to uninstall any of the various versions of JDK or JRE I have on my machine.


For a missing jvm.dll file, we can provide the path of the dll file in eclipse.ini file as

-vm
C:\Progra~1\Java\jdk1.6.0_38\jre\bin\server\jvm.dll

Here it is important to remove any space in the path and the double quotes. It worked for me when i removed the quotes and space.

I hope it helps someone.


I had a similar problem. It was solved doing the following.

  • Move Eclipse to Program Files (not to Program Files (x86)).
  • Remove the path to the 32-bit version of Java from the 'path' environment variable.

I have both versions of Java installed, but Eclipse kept trying to use the 32-bit one.


Sure, you need to have a compatible version of JDK and Eclipse, but you also need to add in the eclipse.ini file the below lines:

-vm
yourdrive\java\bin

Make them the first two lines of your eclipse.ini file.


As many folks already alluded to, this is a 32 vs. 64 bit problem for both Eclipse and Java. You cannot mix up 32 and 64 bit. Since Eclipse doesn't use JAVA_HOME, you'll likely have to alter your PATH prior to launching Eclipse to ensure you are using not only the appropriate version of Java, but also if 32 or 64 bit (or modify the INI file as Jayath noted).

If you are installing Eclipse from a company-share, you should ensure you can tell which Eclipse version you are unzipping, and unzip to the appropriate Program Files directory to help keep track of which is which, then change the PATH (either permanently via (Windows) Control Panel -> System or set PATH=/path/to/32 or 64bit/java/bin;%PATH% (maybe create a batch file if you don't want to set it in your system and/or user environment variables). Remember, 32-bit is in Program files (x86).

If unsure, just launch Eclipse, if you get the error, change your PATH to the other 'bit' version of Java, and then try again. Then move the Eclipse directory to the appropriate Program Files directory.


Alternatively, get the same "bit" version of JRE and Eclipse and then create a new shortcut with the below target (replace the installed JRE and Eclipse location/path):

"C:\studio\eclipse.exe" -vm "C:\Program Files\Java\jre7\bin\server\jvm.dll" eclipse.vm="C:\Program Files\Java\jre7\bin\server\jvm.dll" java.home="C:\Program Files\Java\jre7" java.runtime.version=1.7.0

That should do the trick.


You can solve that problem as many other replicated. You need that Eclipse and the JDK be 32-bits or both on 64-bits. The architecture of the OS doesn't matter while the others remains on the same type of arquitecture.


One of the easy ways to resolve it is to copy the jre folder from installed the JDK into the Eclipse installation folder. Make sure that JDK you copy from is the same architecture as your Eclipse installation.

I had to configure my machine that way, because I run both Eclipse and Appcelerator Titanium Studio on my machine. The Studio needs 32-bit Java, while Eclipse needs 64-bit.


The answers above me got me tempted so much, that I decided to dry run all the possible combinations with OS, Eclipse and JVM trio. Anyway, whoever is digging down and reading my post, check the following as a hot spot (I am Windows 7 user).

  1. You understand Program Files and Program File (x86) are two different folders... x86 stands for the 32-bit version of programs and the former is the 64-bit version.

  2. If you have multiple versions of Java installed with different bitness and release versions, which is bound to happen with so many open source IDEs, managers, administrative consoles, the best option is to set the VM argument directly in the eclipse.ini file. If you don't, Eclipse will go crazy and try searching itself which is not good.


Yes, just make sure your versions of Eclipse and JDK are both 64-bit. Just to make sure everything is correct uninstalled JDK and install it in Program Files and not in Program Files (x86). At least that resolved my problem.


Just check the PATH environment variable. In My Computer - > Properties -> Advanced System settings -> Environment Variables -> (left upper window "User Variables for "some name of PC"" ) just check the PATH variable. If it doesn't exist create it with the following -- > C:\Program Files (x86)\Java\jre7\bin <--

I was faced with the same problem after had updated my Eclipse. I've found that the path asked 64-bit version, but I had the 32-bit in dif path. It was helpful for me. P.S.: I have a 64-bit OS, 32-bit JRE and 32-bit Eclipse. All works fine :)


You should uninstall all old [JREs][1] and then install the newest one... I had the same problem and now I solve it. I've:

Better install Jre 6 32 bit. It really works.


Downloaded 64 bit JVM from site and installed it manually and updated the system path variable. That solved the issue.

  1. Default JVM is installed in my system was in "C:\Program Files
    (x86)\Java\jre7"
  2. Manually installed JVM got installed in "C:\Program Files\Java\jre7" and after updating this pate to system path variable it worked.

Thank you misterfrb, I realised that Eclipse was giving this error, because I had just installed Oracle 10g Developer suite, and it was looking for the jvm.dll file in the C:\DevSuiteHome_1 folder (I must have opted to install JDK again along with developer suite).

After removing the DevSuiteHome lines from the paths variable and adding the correction location for 64-bit jvm.dll (not sure if this was necessary, didn't try without), Eclipse worked again, and Developer suite still does too.


Simple, I have a 64-bit OS, 32-bit Eclipse and both JDK 32 & 64 installed... I just uninstalled the 64-bit JDK and Eclipse is working fine..


I had the same issue after upgrading from Java 6 to Java 7. After I removed Java 6 (64 bit) and reinstalled Java 7 (64 bit), Eclipse worked. :)


It is crucial to add the -vm parameter and its value on 2 lines AT THE BEGINNING of the eclipse.ini

-vm C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe


I want to previde another solution for this error, especially for who want to use 32-bit and 64-bit Eclipse in one system.

Eclipse will startup using the JRE/JDK in jre sub-directory if it exists. (STS or other eclipse based IDE also support this feature...)

The solution is create directory junction using mklink.exe command which exist in windows vista or newer version (junction.exe offer similar function for Windows 2000/XP)
Open the command line windows and exeute following command:

mklink /j "$ECLIPSE-HOME/jre" "$JDK_or_JRE_home"

Of course, if the Eclipse is for 64-bit Windows, the architecture of JDK/JRE must be the same.

Assume:

  • Eclipse for windows x86_64 is installed in d:\devTool\eclipse
  • JDK for windows x64 is installed in C:\Program Files\Java\jdk1.8.0

The command for creating the jre folder will be:

mklink /j "d:\devTool\eclipse\jre" "C:\Program Files\Java\jdk1.8.0"

BTW, delete directory junction will NOT delete any file. If you create a wrong link, you can delete it using file explorer or rmdir command.

rmdir "d:\devTool\eclipse\jre"


Make sure you are starting Eclipse with Administrator rights.


If you use whole 64-bit trio and it still doesn't work (I've come to this problem while launching Android Monitor in Intellij Idea), probably wrong jvm.dll is being used opposed to what your java expects. Just follow these steps:

  1. Find the jvm.dll in your JRE directory: C:\Program Files\Java\jre7\server\bin\jvm.dll

  2. Find the jvm.dll in your JDK directory: c:\Program Files\Java\jdk1.7.0_xx\jre\bin\server\

  3. Copy the jvm.dll from JRE drectory into your JDK directory and overwrite the jvm.dll in JDK.

Don't forget to make a backup, just in case. No need to install or uninstall anything related to Java.


The same occurred to me. I had 64-bit Eclipse, but my JDK was 32-bit. So I installed the 64-bit version and it's OK right now.


I'm not sure why but I had the jre installed into my c:\windows directory and java.exe and javaw.exe inside my windows\system32 directory.

Obviously these directories were getting priority even AFTER adding the -vm flag to my eclipse.ini file.

Delete them from here fixed the issue for me.


You have change proper version of the JAVA_HOME and PATH in environmental variables.


On the download page of Eclipse, it should be written "JRE 32 bits" or "JRE 64 bits" and not "Windows 32 bits" or "Windows 64 bits".

Be sure to use the correct version compatible with your JDE, as answered previously.

참고URL : https://stackoverflow.com/questions/7352493/failed-to-load-the-jni-shared-library-jdk

반응형