From: keven on
Hi,

I have written an app that connects to Mathematica kernel via JLink.
The app no longer worked after I upgraded to Snow Leopard. Running
the JLink SampleProgram returns following error:

Fatal error: cannot find the required native library named
JLinkNativeLibrary.
Exception in thread "main" java.lang.UnsatisfiedLinkError:
com.wolfram.jlink.NativeLink.MLOpen(I[Ljava/lang/String;[Ljava/lang/
String;)J
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 SampleProgram.main(Unknown Source)

It seems that libJLinkNativeLibrary.jnilib needs to be recompiled for
Snow Leopard?

Thanks,

Keven

From: fd on
On Oct 21, 9:30 pm, keven <keven...(a)gmail.com> wrote:
> Hi,
>
> I have written an app that connects to Mathematica kernel via JLink.
> The app no longer worked after I upgraded to Snow Leopard. Running
> the JLink SampleProgram returns following error:
>
> Fatal error: cannot find the required native library named
> JLinkNativeLibrary.
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> com.wolfram.jlink.NativeLink.MLOpen(I[Ljava/lang/String;[Ljava/lang/
> String;)J
> at com.wolfram.jlink.NativeLink.MLOpen(Native Method)
> at com.wolfram.jlink.NativeLink.<init>(Unknown Source)
> at com.wolfram.jlink.MathLinkFactory.createMathLink0(Unkn=
own Source)
> at com.wolfram.jlink.MathLinkFactory.createMathLink(Unkno=
wn Source)
> at com.wolfram.jlink.MathLinkFactory.createKernelLink0(Un=
known
> Source)
> at com.wolfram.jlink.MathLinkFactory.createKernelLink(Unk=
nown Source)
> at SampleProgram.main(Unknown Source)
>
> It seems that libJLinkNativeLibrary.jnilib needs to be recompiled for
> Snow Leopard?
>
> Thanks,
>
> Keven

Hi there..

I experienced some problems with snow leopard as well, and found that
changing the java VM from 64 to 32 provided a solution.

Go to Applications --> utilities --> java preferences and change it to
32 bits and see if it works..

Good luck



From: Mark McClure on
On Wed, Oct 21, 2009 at 6:32 AM, keven <kevenlin(a)gmail.com> wrote:
> I have written an app that connects to Mathematica kernel via JLink.
> The app no longer worked after I upgraded to Snow Leopard.

JLink seems to be working fine on both my brand new MacBook Pro
and my 2 year old Mac Pro running Snow Leopard. I freshly compiled
my java files to make sure that's not the problem as well.

Mark McClure

From: keven on
On Oct 21, 11:28 pm, fd <fdi...(a)gmail.com> wrote:
> On Oct 21, 9:30 pm, keven <keven...(a)gmail.com> wrote:
>
>
>
>
>
> > Hi,
>
> > I have written an app that connects to Mathematica kernel via JLink.
> > The app no longer worked after I upgraded to Snow Leopard. Running
> > the JLink SampleProgram returns following error:
>
> > Fatal error: cannot find the required native library named
> > JLinkNativeLibrary.
> > Exception in thread "main" java.lang.UnsatisfiedLinkError:
> > com.wolfram.jlink.NativeLink.MLOpen(I[Ljava/lang/String;[Ljava/lang/
> > String;)J
> > at com.wolfram.jlink.NativeLink.MLOpen(Native Method)
> > at com.wolfram.jlink.NativeLink.<init>(Unknown Source)
> > at com.wolfram.jlink.MathLinkFactory.createMathLink0(Un=
kn=
> own Source)
> > at com.wolfram.jlink.MathLinkFactory.createMathLink(Unk=
no=
> wn Source)
> > at com.wolfram.jlink.MathLinkFactory.createKernelLink0(=
Un=
> known
> > Source)
> > at com.wolfram.jlink.MathLinkFactory.createKernelLink(U=
nk=
> nown Source)
> > at SampleProgram.main(Unknown Source)
>
> > It seems that libJLinkNativeLibrary.jnilib needs to be recompiled for
> > Snow Leopard?
>
> > Thanks,
>
> > Keven
>
> Hi there..
>
> I experienced some problems with snow leopard as well, and found that
> changing the java VM from 64 to 32 provided a solution.
>
> Go to Applications --> utilities --> java preferences and change it to
> 32 bits and see if it works..
>
> Good luck

It seemed that the problem was JLink could not find 64-bit version of
libJLinkNativeLibrary.jnilib. The problem was solve by running the
app using 32-bit JVM.

From: Fred Klingener on
On Oct 21, 6:30 am, keven <keven...(a)gmail.com> wrote:
> Hi,
>
> I have written an app that connects to Mathematica kernel via JLink.
> The app no longer worked after I upgraded to Snow Leopard. Running
> the JLink SampleProgram returns following error:
>
> Fatal error: cannot find the required native library named
> JLinkNativeLibrary.

....

I've had persistent problems with Mathematica 7.0.1 since I installed
Snow Leopard, and they present in several ways that strongly suggest a
problem with Java.

1.) The simplest manifestation is seen by opening Mathematica,
clicking Mathematica > About Mathematica > System Information.

a.) If my MacBook Pro is connected to the internet, the query
times out in two stages. First, "The kernel is not responding...",
then "One or more dynamic objects..."

b.) If I disconnect from the internet, the System Information
panels appear correctly.

2.) The internet dependence is mirrored in entries from a MathKernel
console.

a.) Connected to the internet, I get

In[1]:= <<Jlink`

In[2]:= InstallJava[]
Intentionally suppressing recursive invocation exception!
java.lang.IllegalStateException: recursive invocation
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1391)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1374)
...

b.) Disconnected from the internet, I get

In[4]:= <<JLink`

In[5]:= InstallJava[]

Out[5]= LinkObject['/Applications/Mathematica-7.0.1.app/
SystemFiles/Links/JLi\
nk/JLink.app/Contents/MacOS/JavaApplicationStub' -init\
"/tmp/m00000119351", 1, 1]

Executions of those two commands from the front end appear to
proceed successfully, independent of the state of the internet
connection.

3.) In attempting normal use of Mathematica, opening notebooks created
under Leopard often but not always leads to a hang ("not
responding...) that can be cleared only by Force Quit. Such notebooks
can often be successfully rebuilt with Import[filename.nb,
"NotebookObject"]. An attempt to load JLink User Guide, for example,
ends in Force Quit.


Changing the Mathematica mode between 32 and 64-bit has no detectable
effect.

I've been corresponding with Mathematica Service about this, but we
haven't been able to pinpoint the crux. Any new ideas here?

Mathematica 7.0.1
MacBook Pro 2.6 GHz Core 2 Duo
OSX 10.6.1 (Snow Leopard)

TIA,
Fred Klingener