5 messages in net.java.dev.jna.users[jna-users] RE: Callback to Mac Carbo...
FromSent OnAttachments
Alan SnyderSep 3, 2008 1:52 pm 
Timothy WallSep 3, 2008 1:59 pm 
Alan SnyderSep 3, 2008 2:52 pm 
Alan SnyderSep 3, 2008 4:10 pm 
Timothy WallSep 3, 2008 4:17 pm 
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:[jna-users] RE: Callback to Mac Carbon APIs.Actions...
From:Alan Snyder (ala@tidebreaksys.com)
Date:Sep 3, 2008 1:52:29 pm
List:net.java.dev.jna.users

Make sure you don't have multiple copies of JNA classes in your classpath.

I don't see multiple copies of these classes. The error happens both when running from the command-line just the same as in the debugger.

(Although the debugger does have both the source and jar file. The jar file is needed for "libjnidispatch.so" does OSX pull that file from the package "com.sun.jna.freebsd-i386" or "com.sun.jna.linux-i386"? I don't see a package for the mac.

Do you have multiple class loaders?

Only see one application class loader in the IDE.

What happens when you do "x instanceof Callback" explicitly on your new callback instance?

"x instanceof Callback" is false while at the same time:

"x instnaceof EventHandlerProcPtr" is true.

If you're using an IDE, does the graphical inheritance hierarchy look correct?

The class hierarchy has:

public static interface EventHandlerProcPtr extends Callback

and

public class KeyListener extends Object implements EventHandlerProcPtr

BTW, the absolute path is not necessary. JNA will find the framework library given just "Carbon".

Thanks,