Discussion:
ScribbleWindow: NoClassDefFoundError
Stephen Williams
2005-06-19 01:07:44 UTC
Permalink
Hi,

I'm trying to get to grips with using java with qt bindings and have a couple
of small problems. I would be grateful if somebody could point me in the
right direction.

I've installed both koala and qtjava. Both the .jar files are
in /use/kde/3.4/lib/java/

How can I add both the .jar files to my classpath? Passing
"-cp /usr/kde/3.4/lib/java/qtjava.jar" works fine, but as soon as I want to
pass in two paths like this:
"-cp /usr/kde/3.4/lib/java/qtjava.jar;/usr/kde/3.4/lib/java/koala.jar", bash
says that there is not such file or directory (but there clearly is).

Then, why does the kdejava-readme say that to run the program you need to go
"java Main"? Shouldn't it be "java ScribbleWindow" (with classpath)?

If I just include qtjava.jar in my classpath, ScribbleWindow will compile, but
java won't run it, outputting: "Exception in thread "main"
java.lang.NoClassDefFoundError: ScribbleWindow". Why is this the case, as the
class ScribbleWindow is clearly in ScribbleWindow.java?

Thank you very much for your help to get me going,

Stephen
Maik Schulz
2005-06-19 07:26:24 UTC
Permalink
Hi Stephen,

you need to use the colon ":", not the semi-colon ";" to separate entries on
your classpath. This is different from MS Windows.

Bye,
-Maik
Post by Stephen Williams
Hi,
I'm trying to get to grips with using java with qt bindings and have a
couple of small problems. I would be grateful if somebody could point me in
the right direction.
I've installed both koala and qtjava. Both the .jar files are
in /use/kde/3.4/lib/java/
How can I add both the .jar files to my classpath? Passing
"-cp /usr/kde/3.4/lib/java/qtjava.jar" works fine, but as soon as I want to
"-cp /usr/kde/3.4/lib/java/qtjava.jar;/usr/kde/3.4/lib/java/koala.jar",
bash says that there is not such file or directory (but there clearly is).
Then, why does the kdejava-readme say that to run the program you need to
go "java Main"? Shouldn't it be "java ScribbleWindow" (with classpath)?
If I just include qtjava.jar in my classpath, ScribbleWindow will compile,
but java won't run it, outputting: "Exception in thread "main"
java.lang.NoClassDefFoundError: ScribbleWindow". Why is this the case, as
the class ScribbleWindow is clearly in ScribbleWindow.java?
Thank you very much for your help to get me going,
Stephen
_______________________________________________
Kde-java mailing list
https://mail.kde.org/mailman/listinfo/kde-java
Robert Graf-Waczenski
2005-06-20 06:54:21 UTC
Permalink
Hi!

Instead of
Post by Stephen Williams
"-cp
/usr/kde/3.4/lib/java/qtjava.jar;/usr/kde/3.4/lib/java/koala.jar"
try rather:

"-cp /usr/kde/3.4/lib/java/qtjava.jar:/usr/kde/3.4/lib/java/koala.jar"

I.e. use the colon instead of the semicolon to separater classpath
entries.

HTH,

Robert

Loading...