This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/27280] New: gcj cannot import inner classes using a wildcard import
- From: "michele at focuseek dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 24 Apr 2006 12:30:11 -0000
- Subject: [Bug java/27280] New: gcj cannot import inner classes using a wildcard import
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Try the following code:
=== p/A.java ===
package p;
public class A {
public static interface AI {
public static final int n = 3;
}
}
=== p/B.java ===
package p;
import p.A.*;
public class B {
static int main(String[] args) {
System.out.println(AI.n);
return 0;
}
}
======
Building this with gcj fails with the error:
./p/B.java:3: error: Can't find default package 'p.A'. Check the CLASSPATH
environment variable and the access to the archives
JDK 1.5 javac can compile the example. Also changing the import in B.java to
import p.A.AI;
makes it work with gcj, too.
--
Summary: gcj cannot import inner classes using a wildcard import
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michele at focuseek dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27280