Question concerning the core protocol
Jeff Sturm
jsturm@one-point.com
Mon Feb 24 19:13:00 GMT 2003
On 2003年2月24日, Erik Poupaert wrote:
> If I understand this right, the Class.getResourceAsStream("myresource.xxx")
> is mapped onto the core protocol in a GCJ-compiled executable.
Yes. The core protocol is searched for named resources along with the
traditional CLASSPATH etc.
> If the class is fully qualified as mynamespace.myClass, does anybody know
> what key I should compile the resource with in the option --resource=key.
> Should use the key "/mynamespace/myClass/myresource.xxx" or the key
> "mynamespace/myClass/myresource.xxx" or something else?
I'd guess you want "mynamespace/myresource.xxx" if the resource file
exists in the same package as myClass. Then any class in mynamespace can
open it using Class.getResourceAsStream("myresource.xxx").
Jeff
More information about the Java
mailing list