Annotations in Java binding

Tim Moloney t.moloney at verizon.net
Thu Apr 20 18:41:46 PDT 2006


Matthew Johnson wrote:
> On Thu, 20 Apr 2006, Tim Moloney wrote:
>
>> Matthew Johnson wrote:
>>> I've updated the Java bindings to both create annotations (and some
>>> other stuff) correctly, and to already contain GLib.CSymbol.
>>>
>>> http://www.matthew.ath.cx/projects/libdbus-java-1.6.tar.gz
>>
>> CreateInterface in 1.6 works well except that I have to change 
>> "org.freedesktop.DBus.GLib" to "org.freedesktop.dbus.GLib" or 
>> "org.freedesktop.dbus.glib" (and rename the directories 
>> appropriately) or else I get a "collides with type" compile-time 
>> error.  That's the good news.
>
> That's because things under org.freedesktop.DBus are supplied with the
> Java bindings, however CreateInterface can't know what already exists,
> so creates them. The problem with this is that org.freedesktop.DBus is
> both an interface, and has a tree underneath it, so everything has to be
> done with inner classes, not with packages. Again, CreateInterface can't
> know this in the general case. I might special case
> org.freedesktop.DBus.

Okay, even though CreateInterface doesn't know that everything under 
org.freedesktop.DBus is provided by the binding, I do (now that you told 
me).  I simply delete the org.freedesktopDBus files created by 
CreateInterface.  The compiler doesn't complain that anything is missing 
and everything works.  Cool.  :)

>> The bad news is that the JVM crashes when running my application with 
>> libdbus-java-1.6.  Dropping back to 1.5 works just fine, even with 
>> the interface classes generated from the 1.6 CreateInterface.  I've 
>> attached the log file in case that helps.
>
> Hmm, that really shouldn't happen. Can you either send me the output
> with DBUS_JAVA_DEBUG=1 or the full source you are trying (or both) so I
> can try and debug this? My test suite runs fine.
>

Okay, this was my fault.  My build environment had hardcoded the path to 
the 1.5 version of dbus.jar.  So I was running the 1.5 jar file with the 
1.6 JNI library.  After I fixed that, everything worked correctly.  I'll 
try not to do stupid things anymore.  :(

Tim Moloney



More information about the dbus mailing list