public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/20941] New: Incorrect case for META-INF with fastjar
@ 2005-04-11  8:08 phil at mkdoc dot com
  2005-04-11  8:11 ` [Bug java/20941] " phil at mkdoc dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  8:08 UTC (permalink / raw)
  To: java-prs

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:

/build/META-INF/services/org.xml.sax.driver

cd /build

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 [1] 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.



[1] http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html

-- 
           Summary: Incorrect case for META-INF with fastjar
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        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
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-05-30 15:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
2005-04-11  8:11 ` [Bug java/20941] " phil at mkdoc dot com
2005-04-11  8:56 ` phil at mkdoc dot com
2005-04-11  9:13 ` phil at mkdoc dot com
2005-04-11  9:18 ` phil at mkdoc dot com
2005-04-11  9:21 ` phil at mkdoc dot com
2005-04-11  9:23 ` phil at mkdoc dot com
2005-04-11  9:47 ` phil at mkdoc dot com
2005-04-11 12:57 ` [Bug libgcj/20941] " pinskia at gcc dot gnu dot org
2005-05-30 15:35 ` [Bug fastjar/20941] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).