public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "nmoyere at calendra dot com" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/15377] New: GCJ does not use the good package for imported classes
Date: Tue, 11 May 2004 15:40:00 -0000	[thread overview]
Message-ID: <20040511154000.15377.nmoyere@calendra.com> (raw)

I use GCJ to compile .java files to .class files.
On the command line, I use the @<java source files list> option to make gcj
compile several classes at a time.
gcj seems to have a bug in the way it resolves the complete class name of an
imported class, and so throws compile errors for valid code.

In my example, I have several classes called AbstractAction. One comming from
javax.swing and another one I have written.
The class MoveUpMultipleDataAction extends the javax.swing.AbstractAction and in
its source file, I use a "import javax.swing.*" instead of writing a complete
class name.
When I compile MoveUpMultipleDataAction with gcj (and the @<file> option), gcj
throws a compile error: for gcj MoveUpMultipleDataAction extends my
AbstractAction class instead of the javax.swing one.
If I remove the first class in the file that contains the java source files to
compile, gcj works fine (even if the removed class has nothing to do the classes
causing the compilation error)
You will find all the sources in the attached file. I tryed to make the example
as small as possible but the bug is difficult to reproduce at a very small scale.

The example uses the following command line:
gcj -d classes -classpath <jakarta ant lib>/ant.jar -g1 -C @javafiles

-- 
           Summary: GCJ does not use the good package for imported classes
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nmoyere at calendra dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: 3.3.2
  GCC host triplet: i686-pc-linux-gnu


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


             reply	other threads:[~2004-05-11 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 15:40 nmoyere at calendra dot com [this message]
2004-05-11 15:42 ` [Bug java/15377] " nmoyere at calendra dot com
2004-05-11 15:48 ` pinskia at gcc dot gnu dot org
2004-05-11 15:57 ` nmoyere at calendra dot com
2005-03-29 14:12 ` phil at mkdoc dot com

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=20040511154000.15377.nmoyere@calendra.com \
    --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).