This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Trying to understand "resource" files in GCJ
- From: Ranjit Mathew <rmathew at hotmail dot com>
- To: java at gcc dot gnu dot org
- Date: Thu, 28 Nov 2002 18:04:29 +0530
- Subject: Trying to understand "resource" files in GCJ
Hi,
As far as I understand, to compile in a resource
file needed by your Java application, you need to
first do something like:
gcj -c --resource foo.bar -o fooBar.o foo/bar.properties
and then link in fooBar.o with the other object files
comprising your application.
As the documentation on this is not very clear, I would
like to ask a few questions:
1. What *exactly* is the significance of the name passed
to the --resource flag? Is it the same string that you
give in code like "this.getClass( ).getResource( "foo.bar")"?
That is, does it build up some kind of a registry for
the implicit ClassLoader so that it knows what to
retrieve for a given identifier?
2. If this object file (fooBar.o) becomes part of a static
library, why would the linker pull it in to construct
the final executable?
Or does it work only for shared libraries? But then,
how? I mean, what module would the ClassLoader try
to load?
Is there some "design notes" or some such thing about
this that I can read? For that matter, a lot of things
in GCJ/libgcj are quite interesting - apart from the
mailing list archives, is there any place one can find
"design notes" about them rather than wasting everyone
else's time by asking such questions?
Thanks in advance.
Sincerely Yours,
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/