[Kde-java] Problems with KDE Java on MacOS X
George Russell
george.russell at clara.net
Tue Mar 2 21:36:50 CET 2004
AFAIK, the bindings simply do not work on OSX, regardless of whether or
not compiled from gcj or javac.
Just as in Linux, they compile and install to the shared library and jar
files in the KDE install prefix.
Unlike in Linux, the JVM does not pick up the presence of the libraries
indicated by the LD_LIBRARY_PATH or the DYLD_LIBRARY_PATH
It always throws an error, as below
Exception in thread "main" java.lang.UnsatisfiedLinkError: no qtjava in
java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at org.kde.qt.qtjava.initialize(qtjava.java:272)
at org.kde.qt.qtjava.<clinit>(qtjava.java:283)
at Main.<clinit>(Main.java:36)
The JVM for OSX needs specially named JNI libraries. This seems to be
only a .jnilib extension, as it works when I symlink libqtjava.dylib to
libqtjava.jnilib
Apple have an example of how to build JNI libraries for OSX
http://developer.apple.com/samplecode/Sample_Code/Java/JNISample.htm
There are details of how OSX differs included in the JNI guide below.
http://www.mindspring.com/~david.dagon/jni/Native.txt
George
More information about the Kde-java
mailing list