Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

"cannot find the required native library named JLinkNativeLibrary" with 64-bit Linux and Java

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74765] "cannot find the required native library named JLinkNativeLibrary" with 64-bit Linux and Java
  • From: blangston at yahoo.com
  • Date: Wed, 4 Apr 2007 04:06:27 -0400 (EDT)

I'm writing a Java program to communicate between a Linux client and a
Windows server using J/Link.  I don't have Mathematica installed on
the Linux client, but I do have the latest J/Link (version 3.1.2)
installed and on the classpath.

When I execute the following line:

kernelLink = MathLinkFactory.createKernelLink("-linkmode connect -
linkname 1234 at 192.168.1.141 -linkprotocol tcpip");

...I get an exception, with the following stack trace:

Fatal error: cannot find the required native library named
JLinkNativeLibrary.
Exception in thread "main" java.lang.UnsatisfiedLinkError: MLOpen
        at com.wolfram.jlink.NativeLink.MLOpen(Native Method)
        at com.wolfram.jlink.NativeLink.<init>(Unknown Source)
        at com.wolfram.jlink.MathLinkFactory.createMathLink0(Unknown
Source)
        at com.wolfram.jlink.MathLinkFactory.createMathLink(Unknown
Source)
        at com.wolfram.jlink.MathLinkFactory.createKernelLink0(Unknown
Source)
        at com.wolfram.jlink.MathLinkFactory.createKernelLink(Unknown
Source)
        at com.wolfram.jlink.Install.main(Unknown Source)

I realize that this is a common error, and I have researched it for
some hours, but with no luck.  Here is my setup, and what I have tried
so far:

Setup:  Centos Linux 4.4, kernel 2.6.9-42.0.3.ELsmp, x86_64, JDK 5 and
6 (both x86_64 versions)

I tried this:
-- put the "Linux" libJLinkNativeLibrary.so in the same directory as
JLink.jar, run with JDK 5 and 6
-- put the "Linux-x86-64" libJLinkNativeLibrary.so in the same
directory as JLink.jar, run with JDK 5 and 6
-- put the "Linux" libJLinkNativeLibrary.so in /usr/lib/, run with JDK
5 and 6
-- put the "Linux-x86-64" libJLinkNativeLibrary.so in /usr/lib64/, run
with JDK 5 and 6
-- put the "Linux" libJLinkNativeLibrary.so and JLink.jar in the jre/
ext directory of JDK 5 and 6
-- put the "Linux-x86-64" libJLinkNativeLibrary.so and JLink.jar in
the jre/ext directory of JDK 5 and 6
-- set the System property "com.wolfram.jlink.libdir" to both the
"Linux" and "Linux-x86-64" directories containing
libJLinkNativeLibrary.so (as mentioned in
com.wolfram.jlink.NativeLink())

So far, no luck.  I don't think the parameters to createKernelLink()
have anything to do with it; even with no parameters (an empty
string), like this...

kernelLink = MathLinkFactory.createKernelLink("");

...I get the same error.  It doesn't even get to the point where it
uses the parameters, since the native library is never loaded.  Does
anyone else have experience getting the J/Link libraries to work with
Linux x86-64 and Java x86-64?  Thanks.



  • Prev by Date: Re: (Not trivial) Definite Integration of a rational function
  • Next by Date: Re: Timing in Mathematica
  • Previous by thread: Re: N function problematic performance (V. 5.2)
  • Next by thread: Probability Density Function