title: dyld: Symbol not found: _JNI_CreateJavaVM
body: <p>What does this error mean? </p>
  
  <p>What do I need to do to resolve it? </p>
  
  <p>I'm trying to run a java based module for node.js (specifically, <a href="https://www.npmjs.com/package/xslt4node" rel="nofollow noreferrer">xslt4node</a>) on Mac OS El Captain but every time I get this error. Everything seems to work OK for windows users. The full error is below:</p>
  
  <blockquote>
    <p>dyld: lazy symbol binding failed: Symbol not found: _JNI_CreateJavaVM 
    Referenced from:
    /projects/main-project/node_modules/java/build/Release/nodejavabridge_bindings.node
    Expected in: flat namespace</p>
    
    <p>dyld: Symbol not found: _JNI_CreateJavaVM   Referenced from:
    /projects/main-project/node_modules/java/build/Release/nodejavabridge_bindings.node
    Expected in: flat namespace</p>
  </blockquote>
  
  <p>I found <a href="https://stackoverflow.com/questions/22397076/undefined-symbols-for-architecture-x86-64-jni-createjavavm-os-x-xcode">Undefined symbols for architecture x86_64: JNI_CreateJavaVM OS-X Xcode</a> which is the closest I could find that explains my exact problem, but I'm not using xcode for development, I'm on a node.js platform.</p>
  
  <p>Has anyone else seen this before? What does it mean?</p>
  
  <p><strong>So far I have tried:</strong></p>
  
  <ol>
  <li>Changing Java versions</li>
  <li>Deleting and rebuilding <code>node_moudles</code></li>
  <li>Adding JVM capabilities <code>&lt;string&gt;JNI&lt;/string&gt;</code></li>
  <li>Uninstalling Java, per documentation here: <a href="https://www.java.com/en/download/help/mac_uninstall_java.xml" rel="nofollow noreferrer">https://www.java.com/en/download/help/mac_uninstall_java.xml</a> running those commands does nothing:</li>
  </ol>
  
  <blockquote>
    <p>user:~ kawnah$ sudo rm -fr
    /Library/PreferencePanes/JavaControlPanel.prefPane user:~ kawnah$
    sudo rm -fr ~/Library/Application\ Support/Java user:~ kawnah$
    java -version java version "9.0.1" Java(TM) SE Runtime Environment
    (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11,
    mixed mode)</p>
  </blockquote>
  
  <ol start="5">
  <li>Trying different version of node (7.10.0)</li>
  <li>Completely uninstalling node/npm, and reinstalling</li>
  </ol>