Wade Chandler <hwadechandler-beanshell@yahoo.com> wrote:
--- David Lee wrote:
> As mentioned before you need the make the entire
> class public.
>
> public class MyFrickinClass {
> ...
>

Just to add ... not giving a protection level (public,
protected, or private) automatically defaults to
package protected.

Wade

That said, however, the package scope protection does not work as expected when 2 classes are loaded by different class loaders, which I believe happened here.  When 2 class loaders load even the same class, the objects they produce will be considered of 2 different classes.  Similarly, if 2 class loaders load things from the same package, package-scope access will not work between the objects they produce.


Alexey
2001 Honda CBR600F4i (CCS)
1992 Kawasaki EX500
http://azinger.blogspot.com
http://bsheet.sourceforge.net


Want to be your own boss? Learn how on Yahoo! Small Business.