Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing msvcp120.dll in bin folder - JDK x64 Windows 8u212-b03 #1091

Open
flizaga opened this issue May 17, 2019 · 5 comments
Open

Missing msvcp120.dll in bin folder - JDK x64 Windows 8u212-b03 #1091

flizaga opened this issue May 17, 2019 · 5 comments
Assignees
Labels
bug Issues that are problems in the code as reported by the community windows Issues that affect or relate to the WINDOWS OS
Milestone

Comments

@flizaga
Copy link

flizaga commented May 17, 2019

Platform:
Windows Server 2012R2

Architecture:
OpenJDK8U-jdk_x64_windows_hotspot_8u212b03

In the OpenJDK8U-jdk_x64_windows_hotspot_8u212b03 build, the awt.dll is linked to msvcp120.dll (a DLL from Microsoft Visual C++ 2013 x64).
This DLL is located on %ProgramFiles%\AdoptOpenJDK\jdk-8.0.212.03-hotspot\jre\bin.
In the default setup AdoptOpenJDK it adds the JDK's bin (%ProgramFiles%\AdoptOpenJDK\jdk-8.0.212.03-hotspot\bin) folder to the PATH env var, but not the jre\bin folder.

So I end up with this error message :
java.lang.UnsatisfiedLinkError: C:\Program Files\AdoptOpenJDK\jdk-8.0.212.03-hotspot\jre\bin\awt.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.(Toolkit.java:1670)
at sun.awt.Win32GraphicsEnvironment.(Win32GraphicsEnvironment.java:66)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at com.hardis.adelia.cloud.tools.AdeliaFontMapping.(AdeliaFontMapping.java:30)

The workaround is to copy %ProgramFiles%\AdoptOpenJDK\jdk-8.0.212.03-hotspot\jre\bin\msvcp120.dll to %ProgramFiles%\AdoptOpenJDK\jdk-8.0.212.03-hotspot\bin

@flizaga
Copy link
Author

flizaga commented May 17, 2019

P.S. in the 8u202 this DLL isn't required

@karianna karianna added this to the May 2019 milestone May 20, 2019
@karianna karianna added the windows Issues that affect or relate to the WINDOWS OS label May 20, 2019
@karianna karianna modified the milestones: May 2019, June 2019 Jun 3, 2019
@karianna karianna modified the milestones: June 2019, July 2019 Jul 5, 2019
@alexnb
Copy link

alexnb commented Jul 17, 2019

Another workaround is to add jre/bin to the PATH.

@karianna karianna modified the milestones: July 2019, August 2019 Aug 6, 2019
@rtm81
Copy link

rtm81 commented Aug 15, 2019

I have the same issue with OpenJDK8U-jdk_x64_windows_hotspot_8u222b10

@karianna karianna modified the milestones: August 2019, September 2019 Sep 2, 2019
@karianna karianna modified the milestones: September 2019, October 2019 Oct 4, 2019
@Matt-Hall
Copy link

I have the same issue with OpenJDK8U-jdk_x64_windows_hotspot_8u232b09

@karianna karianna modified the milestones: October 2019, November 2019 Nov 3, 2019
@sxa sxa modified the milestones: November 2019, Icebox Dec 3, 2019
@M-Davies M-Davies added the bug Issues that are problems in the code as reported by the community label Nov 27, 2020
@MoralCode
Copy link

I have also noticed this issue crop up with the java dll search path. If you run C:\path\to\java.exe -XshowSettings:properties -version using the java.exe from an install of adoptopenjdk/temurin version 8 (i used 1.8.0_322-b06) the java.library.path setting shows this:

[...]
    java.library.path = C:\Program Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\bin
        C:\Windows\Sun\Java\bin
        C:\Windows\system32
        C:\Windows
        C:\Windows\system32
        C:\Windows
        C:\Windows\System32\Wbem
        C:\Windows\System32\WindowsPowerShell\v1.0\
        C:\Windows\System32\OpenSSH\
        C:\Users\localtest\AppData\Local\Microsoft\WindowsApps

        .
    java.runtime.name = OpenJDK Runtime Environment
    java.runtime.version = 1.8.0_322-b06
[...]

I think this is closer to the root cause because i believe this java.library.path is higher in the search order when looking for dependent DLL's than PATH (please correct me if this is wrong though). If openJDK were to include the jre/bin folder in this dll search path, i think the issue with not being able to find msvcp120.dll would be solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are problems in the code as reported by the community windows Issues that affect or relate to the WINDOWS OS
Projects
None yet
Development

No branches or pull requests

9 participants