winrun4j fails to load jvm.dll with openjdk11
Opened this issue · 2 comments
I have been working on packaging openjdk11 with my app. I modified my .ini file to specify the vm.location as the baked in jre. On some Windows 7 machines it works fine and on others it fails. The error it gives is "ERROR: Could not load library: path\to\jvm.dll". I added a GetLastError() call to the code and it is giving error ERROR_PROC_NOT_FOUND (127). The interwebs indicate this is likely a problem loading a dependent dll and not necessarily the jvm dll. Likely on the machines it works on the dll loader is able to find the mysterious dependency and on others not. I cannot put more effort into it right now but I am opening this in case someone else has the same issue or already knows the issue and how to solve it.
Similar issue here.. Getting following error in Win10 with OpenJRE11:
[info] Module Name: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\KonnektingSuite.exe
[info] Module INI: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\KonnektingSuite.ini
[info] Module Dir: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\
[info] INI Dir: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\
[info] Working directory set to: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite
[info] Configured vm.location: .\jdk-11.0.1+13-jre\bin\server\jvm.dll
[info] Found VM: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\jdk-11.0.1+13-jre\bin\server\jvm.dll
[info] Expanding Classpath: ./bin/*.jar
[info] Expanding Classpath: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\bin/konnekting-suite-1.0.0-BETA5-SNAPSHOT-jar-with-dependencies.jar
[info] Generated Classpath: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\bin\konnekting-suite-1.0.0-BETA5-SNAPSHOT-jar-with-dependencies.jar
[info] VM Args:
[info] vmarg.0=-Djava.class.path=C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\bin\konnekting-suite-1.0.0-BETA5-SNAPSHOT-jar-with-dependencies.jar
[err] ERROR: Could not load library: C:\Users\test\Desktop\konnekting-suite-distribution-1.0.0-BETA5-SNAPSHOT-dist-win64\KONNEKTING Suite\jdk-11.0.1+13-jre\bin\server\jvm.dll
[err] Error starting Java VM.
Got Win JRE from here: https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.1%2B13
Damn, realized that I use 64bit and have to use WinRun4J64.exe ... issue solved for me.