This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: .java to binary compilation problem


Jeff Sturm <jsturm@sigma6.com> writes:

> gcj seems to have trouble with ambiguous syntax, like member names vs.
> subpackages.  Try shortening this to:
> 
>   public boolean func() { Context.out.println( "Yo!"); }
> 
> and use an explicit import:
> 
>   import spec.harness.Context;
> 
> Let us know if that compiles.

I hope not.  I'm fairly sure that is not valid Java.

Check 6.5.3.1 in the JLS.  It says "top-level package".
"Context" is not a "top-level package".
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]