“not contain the JNI_CreateJavaVM” – The JNI_CreateJavaVM symbol is a function symbol that is used in the Java Native Interface (JNI) to create a Java Virtual Machine (JVM) instance. If a system does not contain the JNI_CreateJavaVM symbol, it means that the JNI library cannot be loaded properly and that the JVM cannot be created on that system.
“The JVM shared library “/Library/Java/JavaVirtualMachine/jdk1.8.0_20.jdk/Contents/Home/bin/…/jre/lib/server/libjvm.dylib” does not contain the JNI_CreateJavaVM symbol”
Lucky I got the answer.
rambling – This error annoys me for few days cause I cant get my Apache Directory Studio working. Im using Apache Directory studio a lot to do ldap id, user checks and validating others attributes are correct.
So when I have moved to M2 laptop this application is the only application does not happy with its new home. I have been figured and luckily my teammate has his Apache Directory Studio working. I asked his JVM setup and Im applying the same setup like his and its working.
So here how you can fix yours.
![](https://azmi.my/wp-content/uploads/2023/06/Screenshot-2023-06-13-at-11.17.01-AM-edited.png)
You need to list down your Java libraries installed in your macbook using /usr/libexec/java_home -V command and start to move it somewhere safe. For me I made a directory and move into it. Look below. Reason being so that you can isolate the and only use OpenJDK 12.0.1.
➜ ~ sudo mv /Library/Java/JavaVirtualMachines/temurin-16.jdk ~/Documents/oldjava
Once done, you need to download 12.0.1 (x86_64) “Oracle Corporation” – “OpenJDK 12.0.1” file or your can browse to https://jdk.java.net/archive/ and select it manually to download.
![](https://azmi.my/wp-content/uploads/2023/06/Screenshot-2023-06-13-at-11.59.03-AM-1024x500.png)
Move Existing JDK Libraries to Somewhere Safe
Then, extract it and move extracted directory to /Library/Java/JavaVirtualMachines/ , and the result after you run java_home -V should be like this;
➜ ~ /usr/libexec/java_home -V Matching Java Virtual Machines (1): 12.0.1 (x86_64) "Oracle Corporation" - "OpenJDK 12.0.1" /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home ➜ ~
Allow OpenJDK in System Preferences (Privacy & Security)
However you must ensure that you allowed OpenJDK in your System Preferences when you got any pop-up saying that Mac doesn’t trust the publisher.
![](https://azmi.my/wp-content/uploads/2023/06/Screenshot-2023-06-13-at-11.58.20-AM-1024x488.png)
Edit Info.plist for Apache Directory
Lastly, get into the Info.plist file by right-click Application -> Show Package Content -> Contents ->
Then, add in below string in your Info.plist file like so;
<string>-vm</string> <string>/Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home/bin/java</string>
![](https://azmi.my/wp-content/uploads/2023/06/Screenshot-2023-06-13-at-11.59.59-AM-1024x165.png)
From here you should be able to use your Apache Directory Studio.
Good luck.
Another post related to Java if you interested – Generate Thread Dump Dengan jstack