Hello,
I have the following problem with qtjava: on my suse 10.0
(and 10.1), using
the suse packages, I can get my own programs to compile fine
with gcj and
then run. However, on mandriva 2007.0, using the source rpm
for kdebindings,
then building them, then installing them to have qtjava.jar,
it just fails
to link (if I try to compile and link) or compiles without
errors but fails
to run (both with gcj and javac/java).
The code used to test is the one on
http://www.valdyas.org/fading/index.cgi/hacking/gcj.html
Logs are below:
Compiles with gcj but won't run:
[endless localhost ~]$ export
CLASSPATH=/usr/lib64/java/qtjava.jar
[endless localhost ~]$ gcj -C -classpath $
Hello.java
[endless localhost ~]$ gij -classpath $ Hello
Exception in thread "main"
java.lang.NoClassDefFoundError: Hello
at gnu.java.lang.MainThread.run(libgcj.so.7)
Caused by: java.lang.ClassNotFoundException: Hello not found
in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib64/java
/qtjava.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[],
parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7)
at java.lang.ClassLoader.loadClass(libgcj.so.7)
at java.lang.ClassLoader.loadClass(libgcj.so.7)
at java.lang.Class.forName(libgcj.so.7)
at gnu.java.lang.MainThread.run(libgcj.so.7)
[endless localhost ~]$
Compiles with javac (1.5.0-8) but won't run:
[endless localhost ~]$ javac -cp $ Hello.java
[endless localhost ~]$ java Hello
Exception in thread "main"
java.lang.NoClassDefFoundError: Hello
[endless localhost ~]$
Won't compile+link (gcj):
[endless localhost ~]$ gcj -fjni -classpath $
/usr/lib64/java/qtjava.jar Hello.java --main=Hello -o hello
org/kde/qt/Invocation.java: In class
'org.kde.qt.Invocation':
org/kde/qt/Invocation.java: In method
'org.kde.qt.Invocation.fromQtTypeSignature(java.lang.String)
':
org/kde/qt/Invocation.java:43: error: verification failed at
PC=199: String,
int, or float constant expected
org/kde/qt/Invocation.java:43: error: verification failed at
PC=205:
incompatible type on stack
org/kde/qt/Invocation.java:43: error: verification failed at
PC=219: String,
int, or float constant expected
org/kde/qt/Invocation.java:43: error: verification failed at
PC=225:
incompatible type on stack
org/kde/qt/Invocation.java:66: error: expected type
'java.lang.Object' but
stack contains 'int'
org/kde/qt/Invocation.java:68: error: expected type
'java.lang.Object' but
stack contains 'byte'
org/kde/qt/Invocation.java:66: confused by earlier errors,
bailing out
[endless localhost ~]$
RL
_______________________________________________
Kde-java mailing list
Kde-java kde.org
https:
//mail.kde.org/mailman/listinfo/kde-java
|