[kaffe] CVS kaffe (guilhem): Fixed class accessibility.

Guilhem Lavaux guilhem at kaffe.org
Thu Dec 22 06:32:46 PST 2005


Ito Kazumitsu wrote:

>Hi Guilhem,
>
>  
>
>>I have met a new IllegalAccessError in eclipse. I have attached two 
>>files which reproduce the problem.
>>    
>>
>
>legal2.java did not compile.
>
>Found 1 semantic error compiling "legal2.java":
>
>     7.                 legal1.A a = legal1.getA();
>                               ^
>*** Semantic Error: Type "legal1$A" was not found.
>
>So I moved legal2.java to a/legal2.java and changed
>"import a.*" to "package a". Is it OK?
>  
>
Hi Ito,


No. They must be in two separated packages. These java source files 
actually does not compile directly. The other ones I have sent compile
but do not run.

Guilhem.

>Yes, running legal2 causes IllegalAccessError.
>
>But after applying my patch, legal2 prints this:
>
>$ kaffe -classpath . a.legal2
>1
>
>  
>
>>The protected bit is difficult to handle apparently. I have talked with 
>>Tom Tromey and it says that normally we should completely ignore the 
>>accessibility flag in inner classes.
>>    
>>
>
>We may as well do so to make things simple.
>
>  
>
Yes I will see what's possible to do in classMethod.c

Guilhem.




More information about the kaffe mailing list