This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Compilation from JAR files, and "getResourceFromStream()"
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java at gcc dot gnu dot org, "Steve D. Perkins" <mailinglists at steveperkins dot net>
- Date: Tue, 25 Nov 2003 00:12:42 -0600
- Subject: Re: Compilation from JAR files, and "getResourceFromStream()"
- Reply-to: gnustuff at thisiscool dot com
Hi Steve,
> I have found, and had sucess with, the available documentation for
>explicitly referencing resource files at compile-time. HOWEVER, I could
>swear that I've heard discussion in the recent past about plans for
>future versions of GCJ to offer much greater ease-of-use. That is, when
>you compile a native executable from a JAR file containing properties
>files and other resources... those resources will be automatically
>pulled into the executable, and can then be accessed via
>"getResourceAsStream()" etc transparently without extra work.
>(1) Is this already available with GCJ, and I'm simply unaware of
>certain steps needed to make use of it? If it matters, I'm primarily
>using the MinGW port of GCJ on Win32... which tends to lag a version or
>two behind other platforms (I'm currently using 3.3.1).
>(3) Am I completely dreaming all of this? If so, wouldn't that be a
>very cool feature request? :)
You're completely dreaming this. We all have no idea what you're talking about.
No, seriously. If you get my latest build, go to thisiscool-gcc/examples/ResJarTest.
It has exactly what you want. There's a little bit of noise in the Makefile, but
check out this line:
$(GCC_PREFIX)gcj -o test1j.exe --main=com.thisiscool.gcj.tests.resjar.test1.Test1 test1.jar
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/