For this source code ...

... Eclipse reports the following error:
Only type can be imported. pkg.a permits the package
... while Suns javaccompiles it.
A similar situation if I try to fully qualify the class pkg.aas follows:

Eclipse Reports ...
pkg.a cannot be allowed for type
... while Suns javaccompiles it.
It seems that Eclipse prefers to interpret the identifier as a package above the class name, while javac does the opposite. So, is this a bug in Eclipse or in javac?
(The reference to the language specification is obviously a plus.)
source
share