This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with include files in GCJ executable so that readable by getClass().getResourceAsStream()


Hi Zilin,

Sorry for the delayed response.

>I used the GCC/GCJ from www.thisiscool.com and played with libgcj.dll + SWT. Thanks the great work of all people behind GCJ. It works great!
>
>But I found a problem with use libgcj.dll + SWT. I wrote a java program which using 
>
>   getClass().getResourceAsStream()
>
>to load an image file which I use
>
>   gcj --resource a.gif -c a.gif a.o
>
>compiled and linked into program.
>
>My program runs fine with the statical libgcj.a + SWT, but when with the dynamical libgcj.dll + SWT, gcj failed with:
>
>c:/msys/1.0/home/d6vaa/test/SWTPlayer/src/Player.java:599: undefined reference to `__gcj_personality_sj0'
>
>which line 599 is just the line with:
>
>   getClass().getResourceAsStream()
>
>I want to know whether anyone has the same problem or know how to work around this.

The example thisiscool-gcc/examples/HelloSWT.java does this. The Makefile for this is
in thisiscool-gcc/examples. I believe I tested this with the libgcj.dll + SWT configuration and
it worked fine. Could you examine HelloSWT.java and the makefile and see if anything is
different with your build scripts?

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]