You are not logged in.
Pages: 1
I decided to learn Qt Java and KDEJava. I found some demo code here but I can't get it to work.
It compiles fine.
$ javac -classpath $CLASSPATH:/opt/kde/lib/java/qtjava.jar ScribbleWindow.java
But does not run.
$ java -classpath $CLASSPATH:/opt/kde/lib/java/qtjava.jar ScribbleWindow
Exception in thread "main" java.lang.UnsatisfiedLinkError: no qtjava in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.kde.qt.qtjava.initialize(qtjava.java:272)
at org.kde.qt.qtjava.<clinit>(qtjava.java:283)
at ScribbleWindow.<clinit>(ScribbleWindow.java:300)
$
Wiki says that
==> Kdebindings has been built with support for Java and GTK.
==> If you want to use these features use the following pacman commands:
==> 'pacman -S j2sdk'
==> 'pacman -S gtk'
I have kdebindings and j2sdk installed. After searching the forum I'm not sure if Wiki is right. Is kdebindings compiled with java support or not? Am I supposed to install or recompile something to get it working?
Application of abstract techniques and utilities to solving a particular business problem is NOT a patentable idea. It is a fundamental concept of the IT industry.
Offline
at least it should work i never tried it.
would you try to install j2re too?
thanks
greetings
tpowa
Offline
$ java -classpath $CLASSPATH:/opt/kde/lib/java/qtjava.jar ScribbleWindow
ummm, try it like this:
$ java -classpath $CLASSPATH:/opt/kde/lib/java/ ScribbleWindow
Note the actual jar file has been removed.... but I'm no java guru
Offline
ummm, try it like this:
$ java -classpath $CLASSPATH:/opt/kde/lib/java/ ScribbleWindow
It gives different error:
$ java -classpath $CLASSPATH:/opt/kde/lib/java/ ScribbleWindow
Exception in thread "main" java.lang.NoClassDefFoundError: org/kde/qt/QWidget
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Application of abstract techniques and utilities to solving a particular business problem is NOT a patentable idea. It is a fundamental concept of the IT industry.
Offline
hmmm that error looks like it's not too hard to solve, but I'm not a java pro, so I've never seen it - it's one of those things you kinda pickup when using a library... for instance, in MS.NET you can get AssemblySecurityExceptions with some odd message that doesn't make sense when the assembly is not on a local "mount point" (mounted drive?)...
java pros: does that error look familiar?
Offline
Yeah.
Are there more than one jar file in /opt/kde/lib/java? You probably have to add all of them to the classpath.
Adding /opt/kde/lib/java will only add those classes that have .class extensions, it doesn't add classes inside jar files. You have to add them separately. (It IS a pain).
However, I have never seen that first error. What does 'locate qt.java' give you? If you can find it, you might try the following command:
java -classpath -Djava.library.path=/path/to/directory/containing/qt.java $CLASSPATH:/opt/kde/lib/java/qtjava.jar ScribbleWindow
I can investigate the error further tonight.
Dusty
Offline
/opt/kde/lib/java contains koala.jar and qtjava.jar. Having both of them in classpath does not help (same error as in my firs post). I don't think the demo code uses Koala.
'locate qt.java' finds nothing.
Thanks for help anyway.
Application of abstract techniques and utilities to solving a particular business problem is NOT a patentable idea. It is a fundamental concept of the IT industry.
Offline
You could try to get ahold of this guy and see if he figured it out...:
http://lists.suse.com/archive/suse-linu … /2462.html
I searched for the error you got on google and it keeps suggesting a quicktime for java... ;-)
Dusty
Offline
Pages: 1