[Kde-java] How to begin kde java programming

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Jun 14 12:39:23 CEST 2005


On Tuesday 14 June 2005 12:59, Mark Somerville wrote:
> On Tuesday 14 June 2005 10:51, Richard Dale wrote:
> <snip>
>
> > > > > In my limited playing with the demo ScribbleWindow app, I only
> > > > > managed to get it to run using the JVM from Sun. GCJ would compile
> > > > > fine, but GIJ was throwing errors when I tried to run it. I haven't
> > > > > used GCJ/GIJ before though, so I may have been missing something
> > > > > obvious.
> > > >
> > > > It should work ok as long as you have a recent version of gcj - which
> > > > one were you using?
> > >
> > > GCC 3.4.3-20050110
> > >
> > > Presumably this is the same version number as GCJ?
> >
> > Yes, and that's a recent version so it should work. Could you post the
> > errors you have running the ScribbleWindow app, to see if it was
> > something to do with the way you compiled the example though?
>
> I'm pretty sure it's something to do with my config or compile/run
> commands, but since I've never really used GCJ/GIJ I'm a bit lost. I used
> this to compile:
>
> gcj -C -classpath ${CLASSPATH} ScribbleWindow.java
>
> and this to run:
>
> gij -classpath ${CLASSPATH} ScribbleWindow
>
> but got this error:
>
> Exception in thread "main" java.lang.VerifyError: verification failed at PC
> 2 in
> org.kde.qt.Qt:dynamicCast((Ljava.lang.String;Lorg.kde.qt.QtSupport;)Lorg.kd
>e.qt.QtSupport;): String, int, or float constant expected
> at _Jv_BytecodeVerifier.verify_fail(byte, int)
> (/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/libgcj.so.5.0.0)
>    at _Jv_BytecodeVerifier.verify_instructions_0()
> (/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/libgcj.so.5.0.0)
> ...
> ...
Oh dear - that does look like a compiler error. Does it work if you compile 
with the Sun javac and run with gij? In the past the gcj guys have been very 
good about fixing bugs to get QtJava running, so it might be worth reporting 
this to them. I'm using gcc 3.3.3 and that's fine.

-- Richard


More information about the Kde-java mailing list