This is the mail archive of the
mailing list for the GCC project.
[Bug java/20941] New: Incorrect case for META-INF with fastjar
- From: "phil at mkdoc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Apr 2005 08:08:15 -0000
- Subject: [Bug java/20941] New: Incorrect case for META-INF with fastjar
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This case came to light making service provider property files for
GNU JAXP: org.xml.sax.driver etc. These should be created in the
META-INF/services path of the JAR. Reproduce this error by creating a
META-INF/services directory at the root of your compiled class hierarchy and
adding one or more property files (attached) and call fastjar without the M
argument. Compiled classes in /build with the service provider at:
jar cvf /lib/gnu-jaxp.jar .
GNU fastjar takes the file system directory name META-INF and
correctly creates the service provider directory in the JAR, but it
also creates a default manifest file at meta-inf/Manifest.mf.
When I run my JAXP application with gij, it seems to read meta-inf
by default, ignore the META-INF path and cannot resolve a SAX driver to
instantiate. If I suppress the default manifest with the fastjar M
argument, no lowercase meta-inf path is created, the uppercase META-INF
path is processed and the SAX driver is loaded.
jar cvfM /lib/gnu-jaxp.jar .
The Sun JAR specification  does not say META-INF must be
uppercase, but all the examples are in upper case and broader reading
suggests that uppercase path is expected. The attached test case confirms the
Sun JVM expects an uppercase META-INF, so it seems gij is not at fault.
gij --classpath .:$CLASSPATH:/lib/gnu-jaxp.jar XMLReaderTest
java -classpath g:\lib\gnu-jaxp.jar XMLReaderTest
XMLReader created with hard-coded value.
Summary: Incorrect case for META-INF with fastjar
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: phil at mkdoc dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu