Message: 2
Date: Mon, 22 Jun 2009 12:21:20 -0700
From: Greg Guerin <email@hidden>
Subject: Re: jni problems ?
To: list Java-dev <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Lars Gustafsson wrote:
When trying to call "DNSSDService b = DNSSD.browse(typeName,
this);" on a Intel Mac, it fails when running an app created with
the JarBundler ant-task.
On a G4 it works, and when creating a executable jaj-file it works
on all plattforms.
2009-06-22 20.47.12 [0x0-0x41041].AxeptX-1.13[3431] Exception in
thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /usr/lib/
java/libjdns_sd.jnilib: no suitable image found. Did find: /usr/
lib/ java/libjdns_sd.jnilib: no matching architecture in universal
wrapper
This error strongly suggests that you are using a 64-bit JVM, and
that the jnilib does not contain any 64-bit code. "No matching
architecture" is the main signifier.
I have already confirmed that the jnilib does not contain 64-bit
code, using this command-line in Terminal.app:
file /usr/lib/java/*dns*
So, are you using a 64-bit JVM? If so, is this a requirement, or can
you use a 32-bit JVM?
-- GG
------------------------------
Message: 3
Date: Mon, 22 Jun 2009 12:21:37 -0700
From: Pratik Solanki <email@hidden>
Subject: Re: jni problems ?
To: Lars Gustafsson <email@hidden>
Cc: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
You are likely using 64-bit Java (Java 6?) and it is failing to load
that library because it is not built for 64-bit. Do a 'file /usr/lib/
java/libjdns_sd.jnilib' in Terminal to see what it says.
To fix it, pass -d32 to the java command and use Java SE 5.
Pratik