I have some code that successfully uses J/Link (well... until today when something I was doing something with it that crashed the JVM, so), and I recently tried running it under Java 8.

I then get a stack trace:

Fatal error: cannot find the required native library named JLinkNativeLibrary.
java.lang.UnsatisfiedLinkError: com.wolfram.jlink.NativeLink.MLOpenString(Ljava/lang/String;[Ljava/lang/String;)J
    at com.wolfram.jlink.NativeLink.MLOpenString(Native Method)
    at com.wolfram.jlink.NativeLink.<init>(NativeLink.java:117)
    at com.wolfram.jlink.MathLinkFactory.createMathLink0(MathLinkFactory.java:281)
    at com.wolfram.jlink.MathLinkFactory.createMathLink(MathLinkFactory.java:194)
    at com.wolfram.jlink.MathLinkFactory.createKernelLink0(MathLinkFactory.java:171)
    at com.wolfram.jlink.MathLinkFactory.createKernelLink(MathLinkFactory.java:65)

Do I need to change something to run under Java 8? Has anyone seen this before?

  • $\begingroup$ What OS is this running on? If windows, the error message suggests that JLinkNativeLibrary is not on the OS Path. $\endgroup$
    – Ymareth
    Sep 24, 2014 at 8:15
  • $\begingroup$ @Ymareth, this is on OS X. When using Java 7 it successfully finds the library based on its relative path from JLink.jar. Under Java 8 apparently not. $\endgroup$ Sep 24, 2014 at 11:58
  • $\begingroup$ Can you try (have you tried already) with the library explicitly on the path? $\endgroup$
    – Ymareth
    Sep 24, 2014 at 13:21


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.