This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: problem with class.getResourcesAsStream()
- From: Tom Tromey <tromey at redhat dot com>
- To: bapt <bapt at binouze dot net>
- Cc: java at gcc dot gnu dot org
- Date: 10 Apr 2003 22:20:25 -0600
- Subject: Re: problem with class.getResourcesAsStream()
- References: <1049384090.15704.19.camel@localhost>
- Reply-to: tromey at redhat dot com
>>>>> ">" == bapt <bapt at binouze dot net> writes:
>> I'm currently making a java program with gcj and swt.
>> I'm making a jar and them compiling the jar to native code using gcj
>> everything is ok til this point (thanks for your great stuff :))
>> but when I execute the binary file, if I have the original jar file in
>> the classpath in order to make it run.
What version of gcj are you using?
Basically you need to make sure the resources are also compiled into
the executable (or library). See the documentation for the
--resource option.
With the cvs trunk gcj (which will eventually, probably, be 3.4), if
you compile a .jar file all at once, the non-.class files in the jar
are automatically compiled as resources. (Which, as I found out this
week, can really suck if a bunch of random .o files end up in the jar
by mistake.)
In the meantime it is pretty easy to write a script to unpack a .jar
and individually compile each file as appropriate.
Tom