From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29302 invoked by alias); 7 Jan 2003 18:39:20 -0000 Mailing-List: contact rhug-rhats-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rhug-rhats-owner@sources.redhat.com Received: (qmail 29288 invoked from network); 7 Jan 2003 18:39:19 -0000 Received: from unknown (HELO amsfep14-int.chello.nl) (213.46.243.22) by 209.249.29.67 with SMTP; 7 Jan 2003 18:39:19 -0000 Received: from node-c-6778.a2000.nl ([62.194.103.120]) by amsfep14-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with ESMTP id <20030107183906.ZJRS3670.amsfep14-int.chello.nl@node-c-6778.a2000.nl>; Tue, 7 Jan 2003 19:39:06 +0100 Subject: PR? gcj --resouce From: Dhek Bhun Kho To: Java general Cc: Rhug Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 07 Jan 2003 18:39:00 -0000 Message-Id: <1041964748.27242.42.camel@tasslehof.bhun.net> Mime-Version: 1.0 X-SW-Source: 2003-01/txt/msg00004.txt.bz2 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?