This is the mail archive of the rhug-rhats@sources.redhat.com mailing list for the RHUG project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR? gcj --resouce


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]