Trying to understand "resource" files in GCJ
Ranjit Mathew
rmathew@hotmail.com
Thu Nov 28 07:59:00 GMT 2002
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/
More information about the Java
mailing list