Failed to load the JNI shared Library (JDK)

前端 未结 30 2477
自闭症患者
自闭症患者 2020-11-22 07:09

When I try opening Eclipse, a pop-up dialog states:

Failed to load the JNI shared library \"C:/JDK/bin/client/jvm.dll\"`.

Follow

30条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 07:59

    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"

提交回复
热议问题