public inbox for rhug-rhats@sourceware.org
 help / color / mirror / Atom feed
* PR? gcj --resouce
@ 2003-01-07 18:39 Dhek Bhun Kho
  0 siblings, 0 replies; only message in thread
From: Dhek Bhun Kho @ 2003-01-07 18:39 UTC (permalink / raw)
  To: Java general; +Cc: Rhug

Hi there,

[from GCJ Manual:]
--resource resource-name
    This option is used to tell gcj to compile the contents of a given
file to object code so it may be accessed at runtime with the core
protocol handler as core:/resource-name. Note that resource-name is the
name of the resource as found at runtime; for instance, it could be used
in a call to ResourceBundle.getBundle. The actual file name to be
compiled this way must be specified separately. 

I don't know whether this has been reported already. But I almost broke
my head on this. When compiling resources like this:

gcj --resource /a/b/c/d/e/f x/a/b/c/d/e/f -o y/a/b/c/d/e/f.o -c

The methods getResourceAsStream() and getResource() won't find the
resource defined and linked like this. It's not a big problem if you
know it, but it's a bit awkward considering that in the java code the
Class.getResourceAsStream() and Class.getResouce() method calls actually
pass "/a/b/c/d/e/f" as parameter and not "a/b/c/d/e/f". The latter which
is the only way to enable the resource to be found using the core:/
protocol.

Should I create a PR for this or is this a feature?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-07 18:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-07 18:39 PR? gcj --resouce Dhek Bhun Kho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).