11 messages in net.java.dev.jna.usersRe: [jna-users] Java 5 dependency on OSX
FromSent OnAttachments
Chris SewartJul 28, 2007 6:14 am 
Timothy WallJul 28, 2007 8:31 pm 
Timothy WallJul 28, 2007 8:39 pm 
Timothy WallJul 29, 2007 11:38 am 
Michael HallJul 29, 2007 2:13 pm 
Timothy WallJul 29, 2007 2:40 pm 
Timothy WallJul 30, 2007 1:34 pm 
Timothy WallJul 30, 2007 1:47 pm 
Michael HallJul 30, 2007 2:04 pm 
Chris SewartJul 31, 2007 4:13 am 
Timothy WallJul 31, 2007 7:38 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Java 5 dependency on OSXActions...
From:Timothy Wall (twal@dev.java.net)
Date:Jul 28, 2007 8:39:58 pm
List:net.java.dev.jna.users

On Jul 28, 2007, at 9:14 AM, Chris Sewart wrote:

I've been trying to get JNA running on a Mac running 10.3. As soon as I call anything I get an exception trying the load the JNA libjnidispatch.jnilib. It seems that this has been linked with the AWT dynamic library, but seems to be trying to load it from:

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ Libraries/libjawt.dylib

This works fine when Java 5 is installed, but on 10.3 it won't be. I fiddled about with the makefile to try and get it to link to:

/System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib

Which I figured would be valid on any machine, but this is a symlink that resolves to Java 5 (on my dev machine) so I wind up with a library with the same problem. I confess to knowing next to nothing about linking dynamic libraries on OS X so am a bit stumped. Surely there must be a way of linking to 'the current version' ?

What you might try is to make JavaVM.framework/Libraries/ libjawt.dylib a real file so that "otool -L" indicates that path as the required one. Do your library build, then re-work your symlinks to test whether the build (whether against the 1.4 or 1.5 dylib) works against a different release.

Alternatively you might simply drop the jawt dependency for the OSX build, since it's not currently used (omit the "-ljawt" link argument).

Have you actually tried running the Java 1.5 build on OSX 10.3? What happens?