title: Error with "nativemvm library" Engine API Java with Matlab
body: <p>I am trying to call Matlab in Java, I followed the steps given by the documentation : <a href="https://fr.mathworks.com/help/matlab/matlab_external/setup-environment.html#bvcubp5" rel="nofollow noreferrer">https://fr.mathworks.com/help/matlab/matlab_external/setup-environment.html#bvcubp5</a></p>
  
  <p>And I tried to compile this code : </p>
  
  <pre><code>import com.mathworks.engine.*;
  
  public class javaPassArg{
      public static void main(String[] args) throws Exception{
          MatlabEngine eng = MatlabEngine.startMatlab();
          double[] p =  {1.0, -1.0, -6.0};
          double[] r = eng.feval("roots", p);
          for (double e: r) {
              System.out.println(e);
          }
          eng.close();
      }
  }
  </code></pre>
  
  <p>I added the engine.jar to Eclipse as mentioned</p>
  
  <p><img src="https://i.stack.imgur.com/DSRGB.png" alt=""></p>
  
  <p>And I configured the environment variable of Windows
  <img src="https://i.stack.imgur.com/k2wvh.png" alt=""></p>
  
  <p>I am having a well-known error:</p>
  
  <p><img src="https://i.stack.imgur.com/83aaG.png" alt="known error"></p>
  
  <p><strong>The nativemvm library is not found</strong></p>
  
  <p>Here is the detailed error :</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: no nativemvm in java.library.path
      at java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.lang.Runtime.loadLibrary0(Unknown Source)
      at java.lang.System.loadLibrary(Unknown Source)
      at com.mathworks.mvm.MvmImpl.loadLibrary(MvmImpl.java:107)
      at com.mathworks.mvm.MvmImpl.setJavaEngineMode(MvmImpl.java:202)
      at com.mathworks.engine.MatlabEngine.&lt;clinit&gt;(MatlabEngine.java:69)
      at javaPassArg.main(javaPassArg.java:5)
  </code></pre>
  
  <p>But as you can see in my screen my java.library.path is well defined, and the <strong>nativemvm.dll does really exist in the folder</strong> ! I also defined it directly in Eclipse, but it's not working either.</p>
  
  <p>Does somebody have an idea? </p>