OSX Eclipse installer does not contain the JNI_CreateJavaVM symbol error

By | June 16, 2018

If you are trying to install Eclipse and you get the following error:

The JVM shared library “/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/../lib/server/libjvm.dylib”
does not contain the JNI_CreateJavaVM symbol.

You want to:

  1. Right click the installer file and select ‘show package contents’
  2. Go to Contents and open Info.plist
  3. At the bottom of this file, you’ll see a commented section with the tag <string>-vm</string>. Change it to point to the location of Java.

For example, my one was: string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8/Contents/Home/bin/java</string>

so I changed it to: string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/java</string>

Don’t forget to uncomment it as well. If you are not sure of your location of Java, run echo $JAVA_HOME in terminal to find out.

3 thoughts on “OSX Eclipse installer does not contain the JNI_CreateJavaVM symbol error

  1. Mark

    The installer is on a read-only filesystem and if I move it to my desktop, I’m told the installer is corrupt.

    Reply
  2. Martin Skarsaune

    When running in terminal this error message appears:

    ./eclipse-inst -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/server/libjvm.dylib
    2019-12-22 21:05:30.117 eclipse-inst[46616:1712507] Error loading /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/MacOS/libjli.dylib: dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/MacOS/libjli.dylib, 265): no suitable image found. Did find:
    /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/MacOS/libjli.dylib: code signature in (/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/MacOS/libjli.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

    Reply

Leave a Reply

Your email address will not be published.