java/6818: "Can't find default package" when package has no classes

oskar@osk.mine.nu oskar@osk.mine.nu
Sun May 26 07:26:00 GMT 2002


>Number:         6818
>Category:       java
>Synopsis:       "Can't find default package" when package has no classes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 26 07:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     oskar@osk.mine.nu
>Release:        3.1
>Organization:
>Environment:
Linux/x86
>Description:
gcj reports "Can't find default package `xxx'" when a package with no class files is imported. (I don't know what the point is in important a class-less package, but javac in Sun JDK 1.4 and jikes don't report this error.)
>How-To-Repeat:
Run

mkdir -p foo/bar
cat >foo/bar/Test.java <<_END_
package foo.bar;
import foo.*;
public class Test { }
_END_
gcj -C foo/bar/Test.java

The output is:

foo/bar/Test.java:2: Can't find default package `foo'. Check the CLASSPATH environment variable and the access to the archives.
1 error
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list