Problem with Java and DCOP

Brecht Yperman brecht at yperman.eu
Thu Feb 14 20:13:11 UTC 2008


Hi,

I'm trying to call DCOP from Java.

I first tried to do
Runtime.getRuntime().exec("dcop amarok playlist popupMessage test");

This returns an error:
ERROR: Couldn't attach to DCOP server!
though I can execute the same command in a terminal window.

I then tried to use org.kde.DCOP.Client from dcopjava.jar found in 
/usr/share/java

I keep getting Unsatisfied Link Errors:

java.lang.UnsatisfiedLinkError: no javadcop in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1030)
	at org.kde.DCOP.Client.<clinit>(Client.java:59)

I tried printing java.library.path, it does not mention /usr/lib/jni 
(where libjavadcop.so resides), so I created soft links in both /usr/lib 
and /lib (both mentioned in java.library.path), but still no luck.

I also tried System.loadLibrary("/usr/lib/jni/libjavadcop.so") but this 
returns an error about directory separators.

Any help very much appreciated.

Thanks,
Brecht



More information about the Amarok mailing list