I assume it will return the URL in both cases. -- BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [email protected]
office: +1 386 848 1781 mobile: +1 386 848 3788 From: Ikuo Yamasaki <[email protected]> To: [email protected] Date: 2010/03/16 03:52 Subject: [osgi-dev] Q on Bundle#getResource() Sent by: [email protected] Hi OSGi Exports, I have questions on Bundle#getResource(String name). Let me assume that bundle1 would like to get resource of "OSGI-INF/text.txt" in the bundle JAR file. Q1. Which should Bundle#getResource("OSGI-INF/test.txt") return, the URL of the resource or null ? I expect the URL. Q2. Which should Bundle#getResource("/OSGI-INF/test.txt") return, the URL of the resource or null ? I expect the URL as well, but not sure. The spec says "The name of the resource. See java.lang.ClassLoader.getResource for a description of the format of a resource name." I cannot find the any format of a resource name in http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String) Best regards, --------------------- NTT Cyber Solutions Laboratories Ikuo YAMASAKI E-mail: [email protected] TEL +81-46-859-8537 FAX +81-46-855-1282 _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
