jcryptool / core

JCrypTool Core Plug-ins
https://www.cryptool.org
Eclipse Public License 1.0
161 stars 43 forks source link

macOS: The JVM shared library does not contain the JNI_CreateJavaVM symbol #252

Closed dschadow closed 3 years ago

dschadow commented 3 years ago

From the JCrypTool contact form by Michael:

Startup fails with the following error message: "The JVM shared library "/Library/Java/JavaVirtualMachines/temurin-11.jre/Contents/Home/bin/../lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol"

Installed Java runtime is the one from the JCT homepage.

java --version openjdk 11.0.12 2021-07-20 OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7) OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)

macOS 10.15.7

dschadow commented 3 years ago

I am able to reproduce the error on macOS 11.6 with only the the linked Java version installed. JCT did not work with the Temurin 11 JDK either (in fact none of the Temurin versions did, in my eyes we should recommend installing another Java version (SDK), even if that ends up in a larger download).

StanciuMarian commented 3 years ago

@dschadow did you find a workaround or a JRE/JDK that actually works? I encounter the same problem on a M1 macbook

simlei commented 3 years ago

Could either of you try it with other JREs? I would suggest using https://sdkman.io/ for managing the active JRE, or a similar SDK manager. When installed, sdkman command sdk list java should give you candidates like...

Available Java Versions
================================================================================
 Vendor        | Use | Version      | Dist    | Status     | Identifier
--------------------------------------------------------------------------------
 AdoptOpenJDK  |     | 16.0.1.j9    | adpt    |            | 16.0.1.j9-adpt      
               |     | 16.0.1.hs    | adpt    |            | 16.0.1.hs-adpt      
               |     | 11.0.11.j9   | adpt    |            | 11.0.11.j9-adpt     
               | >>> | 11.0.11.hs   | adpt    | installed  | 11.0.11.hs-adpt     
               |     | 8.0.292.j9   | adpt    |            | 8.0.292.j9-adpt    

and many other venders, like temurin. Please do try 11.0.11.hs first if you use sdkman.

Thanks already!

simlei commented 3 years ago

Turns out, the JRE may have been the culprit after all! With Amazon Corretto, these problems did disappear in one test for us. It would be nice if you could affirm that.

Thanks! :)

StanciuMarian commented 3 years ago

I can confirm that it is working with Amazon Corretto 11 on a M1 Macbook.

Thanks for the help

simlei commented 3 years ago

Great, thanks for confirming! I am closing this issue — further work on OS/X compatibility is planned, i.e. we want to be able to package the JRE with the product so that no JRE installation at all is required.

kheitkamp commented 1 year ago

Still works, on an M1 with the Amazon Corretto using Ventura 13.5.2

simlei commented 1 year ago

Great news, thanks for reporting!

On Wed, Sep 27, 2023, 12:02 PM Kristian Heitkamp @.***> wrote:

Still works, on an M1 with the Amazon Corretto using Ventura 13.5.2

— Reply to this email directly, view it on GitHub https://github.com/jcryptool/core/issues/252#issuecomment-1737093296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHP223XTQKES3AJEBFTCRLX4P2UFANCNFSM5EKCFSGA . You are receiving this because you modified the open/close state.Message ID: @.***>