List Info

Thread: qtjava (kdebindings-3.5.4-1mdv2007.0.src.rpm)




qtjava (kdebindings-3.5.4-1mdv2007.0.src.rpm)
user name
2006-10-11 05:55:10
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:
[endlesslocalhost ~]$ export
CLASSPATH=/usr/lib64/java/qtjava.jar
[endlesslocalhost ~]$ gcj -C -classpath $
Hello.java
[endlesslocalhost ~]$ 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)
[endlesslocalhost ~]$

Compiles with javac (1.5.0-8) but won't run:

[endlesslocalhost ~]$ javac -cp $ Hello.java
[endlesslocalhost ~]$ java Hello
Exception in thread "main"
java.lang.NoClassDefFoundError: Hello
[endlesslocalhost ~]$

Won't compile+link (gcj):

[endlesslocalhost ~]$ 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
[endlesslocalhost ~]$



RL

_______________________________________________
Kde-java mailing list
Kde-javakde.org
https:
//mail.kde.org/mailman/listinfo/kde-java
qtjava (kdebindings-3.5.4-1mdv2007.0.src.rpm)
user name
2006-10-11 07:43:41
On Wednesday 11 October 2006 07:55, Rafael Lopez wrote:
> 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:
> [endlesslocalhost ~]$ export
CLASSPATH=/usr/lib64/java/qtjava.jar
> [endlesslocalhost ~]$ gcj -C -classpath
$ Hello.java
> [endlesslocalhost ~]$ 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)
> [endlesslocalhost ~]$

Maybe you need to explicitly add the current directory or
"." to the classpath

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer
KDE user support, developer mentoring
_______________________________________________
Kde-java mailing list
Kde-javakde.org
https:
//mail.kde.org/mailman/listinfo/kde-java
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )