-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Could not load libjvm
on Windows servers
#623
Comments
As of now it's best of you include it yourself. I wouldn't want to distribute something and conflict with other libraries. |
One option I see would be to dynamically link against UCRT, and statically linking VCRT: https://github.com/microsoft/WindowsAppSDK/blob/main/docs/Coding-Guidelines/HybridCRT.md |
Interesting. One of my worries with any static linking is the size. Because we didn't just distribute a single DLL, but like 12. And they would all need the static bits. I'll try to get this working and see if it is acceptable. |
e.g. libjvm would statically link in
Maybe talking a couple of kilobytes. Quoted:
|
Starting from IKVM 8.9.0, the application crashes on startup with a
Could not load libjvm
exception when initializing IKVM on Windows servers that do not have the Microsoft Visual C++ Redistributables installed.Minimal repro I use - just call
java.lang.System.getenv();
ikvm-test1.zip
The build generates in the output all the necessary IKVM dependencies used by win-x64 - there is nothing missing regarding IKVM runtime dependencies.
Deeper analysis with
procmon
revealed that the cause of the crash was the absence ofVCRUNTIME140.dll
, which is a native dependency for loadingjvm.dll
itself.What is the correct approach for deployment on Windows servers? Is it intended to install Microsoft Visual C++ Redistributables separately as prerequirement for IKVM JVM? Or maybe these dependencies should be distributed with IKVMs JRE images for win RIDs?
The text was updated successfully, but these errors were encountered: