public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/29194]  New: fails to import package from project
@ 2006-09-23 17:18 debian-gcc at lists dot debian dot org
  2006-09-23 17:18 ` [Bug java/29194] " debian-gcc at lists dot debian dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2006-09-23 17:18 UTC (permalink / raw)
  To: java-prs

[forwarded from http://bugs.debian.org/369873]

GCJ fails with 

   Can't find default package 'core'. ... 

when a class source file specifies `import core.*'.   A full example is 
outlined below. 

If you try to compile this `project' like 

  gcj -d . src/Main.java src/core/Foo.java 

the above mentioned error is reported.  The same project works fine
with Sun's or Blackdown's Java compiler. 

Suppose we have the directory structure 

  > find . 
  ./src
  ./src/core
  ./src/core/Foo.java
  ./src/Main.java

with the following contents of `src/Main.java': 

  // commenting out this line makes the classes compile. 
  import core.*;

  public class Main 
  {
      public Main() 
      {
          core.Foo foo = new core.Foo();
          foo.print();
      }
      public static void main(String args[]) 
      {
          Main m = new Main();
      }
  }

and the following contents of `src/core/Foo.java': 

  package core;

  public class Foo 
  {
      public Foo()
      {}
      public void print() 
      {
        System.out.println("Hello, world");
      }
  }


-- 
           Summary: fails to import package from project
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


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


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

end of thread, other threads:[~2007-01-09 20:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-23 17:18 [Bug java/29194] New: fails to import package from project debian-gcc at lists dot debian dot org
2006-09-23 17:18 ` [Bug java/29194] " debian-gcc at lists dot debian dot org
2006-09-23 22:33 ` tromey at gcc dot gnu dot org
2007-01-09 20:54 ` tromey 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).