[Bug java/20941] Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-04-11 09:47 ---
Lots of attachments, but it's simple really:

1. Set two environment variables: $mk_home, a path in which the source is at 
$mk_home/lib-src/jaxp, and $mk_build, which is a temporary build directory

2. Put all the bash scripts in the same directory, say $mk_home/bin (chmod +x)

3. Extract the GNU JAXP source to $mk_home/lib-src/jaxp

4. Run $mk_home/bin/jar-jaxp.sh to compile and archive the classes: the JAR is 
created at $mk_home/lib/gnu-jaxp.jar

5. Compile XMLReaderTest.java with $mk_home/lib/gnu-jaxp.jar in the classpath.

6. Run XMLReaderTest with with $mk_home/lib/gnu-jaxp.jar in the classpath, 
default package, no arguments.

The source JAR does not include the service provider directory. To test with 
the 
service provider:

7. Save the service provider file at $mk_home/lib-src/META-INF/services/org.xml.
sax.driver

8. Re-run $mk_home/bin/jar-jaxp.sh

9. Re-run XMLReaderTest with with $mk_home/lib/gnu-jaxp.jar in the classpath.

To test fastjar with the M argument, add it to $mk_home/jar-jaxp.sh and repeat 
7 
and 8 above.


Correction to my original report: the Sun JVM is case insensitive to META-INF, 
gij is case sensitive.

-- 


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


[Bug java/20941] Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-04-11 09:23 ---
Created an attachment (id=8588)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8588&action=view)
Check you have the necessary environment variables

Checks the $mk_home and $mk_build environment variables are set.

-- 


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


[Bug java/20941] Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-04-11 09:21 ---
Created an attachment (id=8587)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8587&action=view)
Fastjar archive script for GNU JAXP

Creates a JAR of the compiled GNU JAXP classes. Requires environment variables
$mk_home, a path in which the source is at $mk_home/lib-src/jaxp, and
$mk_build, which is a temporary build directory.

-- 


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


[Bug java/20941] Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-04-11 09:18 ---
Created an attachment (id=8586)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8586&action=view)
GCJ compile script for GNU JAXP

Compiles GNU JAXP source to classes. Requires environment variables $mk_home, a
path in which the source is at $mk_home/lib-src/jaxp, and $mk_build, which is a
temporary build directory.

-- 


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


[Bug java/20941] Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-04-11 09:13 ---
Created an attachment (id=8585)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8585&action=view)
GNU JAXP pure Java source, no natives

GNU JAXP source classes, compile using the attached script.

-- 


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


[Bug java/20941] Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-04-11 08:56 ---
Created an attachment (id=8584)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8584&action=view)
Test case for org.xml.sax.driver service provider property

First checks any service provider configuration using
XMLReaderFactory.createXMLReader(), then with a system property or a hard coded
value to confirm the class can be loaded one way or another.

-- 


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


[Bug java/20941] Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-04-11 08:11 ---
Created an attachment (id=8583)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8583&action=view)
SAX driver service provider file

Driver class: gnu.xml.aelfred2.SAXDriver

-- 


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


[Bug java/20941] New: Incorrect case for META-INF with fastjar

2005-04-11 Thread phil at mkdoc dot com
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


[Bug java/15377] GCJ does not use the good package for imported classes

2005-03-29 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-03-29 11:53 ---
I have seen similar behaviour to this where concrete classes are named after 
their interfaces. I haven't been able to to produce a simple test case. This 
bug 
looks very similar to bug 18796.

-- 
   What|Removed |Added

 CC||phil at mkdoc dot com


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


[Bug java/19173] problems resolving classes

2005-03-29 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2005-03-29 11:36 ---
This appears to be a duplicate of bug 10894.

-- 
   What|Removed |Added

 CC||phil at mkdoc dot com


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


[Bug java/10894] Valid import statements are rejected.

2004-12-22 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2004-12-22 18:06 ---
Also affects GCJ 3.3.3 (cygwin special). Can I suggest the summary is changed 
to 
"Wildcard import statements not resolved", which seems more specific to me and 
may avoid duplicate submissions.

This test case implements an interface, but the same applies extending an 
abstract or concrete class, it's the import statement that is the problem:

-- WildcardImport.java

package com.example.bug;

import com.example.other.*;

public class WildcardImport implements Interfacer {

// Empty
}

-- Interfacer.java

package com.example.other;

public interface Interfacer {

// Empty
}

This is with commands like:

gcj -C -d /build @gcj-src.txt

-- 
   What|Removed |Added

 CC|        |phil at mkdoc dot com


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


[Bug java/18789] New: GCJ does not fail with omitted import

2004-12-02 Thread phil at mkdoc dot com
If a dependent class in another package is not explicitly declared in an import 
statement but the two classes are compiled together, GCJ does not fail.

-- OmittedImport.java

package com.example.bug;

public class OmittedImport {

public OmittedImport(NotImported notImported) {
// Empty
}
}

-- NotImported.java

package com.example.other;

public class NotImported {

// Empty
}

This is using a command lines like:

$ gcj -C -d /out /src/com/example/**/*.java

$ gcj -C -d /out /src/com/example/bug/OmittedImport.java 
/src/com/example/other/NotImported.java

If the OmittedImport class is compiled alone, it does fail as one would expect. 
The Sun SDK does not compile the OmittedImport class in any case.

-- 
   Summary: GCJ does not fail with omitted import
   Product: gcc
   Version: 3.3.3
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=18789


[Bug libgcj/9866] static nested class refers to private member of outer class

2004-11-15 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2004-11-15 18:03 ---
This bug also affects GCJ 3.3.2 on GNU/Linux and 3.3.3 on Cygwin.

The class org.w3c.tidy.ParserImpl in the JTidy tool is another test case.

http://sourceforge.net/projects/jtidy/



-- 
   What|Removed |Added

 CC||phil at mkdoc dot com


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


[Bug java/6163] anonymous class verifier error

2004-10-28 Thread phil at mkdoc dot com

--- Additional Comments From phil at mkdoc dot com  2004-10-28 12:59 ---
Is this a final verdict on this issue? This problem also affects compatibility 
with the Sun 1.3 interpreter. Can I take it that the Sun 1.4 interpreter is the 
benchmark reference for GCJ going forward?

Thanks.

Phil

-- 


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


[Bug java/18175] New: Can't find default package with redundant package import

2004-10-27 Thread phil at mkdoc dot com
The following class will not compile with GCJ version 3.3.3 (cygwin special), 
succeeds with Sun javac. The workaround is obvious, but not always easy with 
other people's code.

$ gcj -classpath . -C Test.java
Test.java:3: error: Can't find default package `com.example'. Check the CLASSPAT
H environment variable and the access to the archives
1 error

-- Test.java

package com.example;

import com.example.*;

class Test {

}

-- End Test.java

-- 
   Summary: Can't find default package with redundant package import
   Product: gcc
   Version: 3.3.3
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=18175