This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Problem with include files in GCJ executable so that readable by getClass().getResourceAsStream()
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java at gcc dot gnu dot org, Zilin Du <zd223 at nyu dot edu>
- Date: Sun, 11 Apr 2004 18:53:37 -0500
- Subject: Re: Problem with include files in GCJ executable so that readable by getClass().getResourceAsStream()
- Reply-to: gnustuff at thisiscool dot com
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/