public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "michele at focuseek dot com" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/27280]  New: gcj cannot import inner classes using a wildcard import
Date: Mon, 24 Apr 2006 12:30:00 -0000	[thread overview]
Message-ID: <bug-27280-11683@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2006-04-24 12:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 12:30 michele at focuseek dot com [this message]
2006-04-26  2:44 ` [Bug java/27280] " pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27280-11683@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).