[1842] in java-interest
Re: IllegalAccessException
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Mon Sep 18 19:33:46 1995
Date: Mon, 18 Sep 1995 10:00:38 -0800 (PDT)
From: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
Reply-To: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
To: Jay Fenton <jay@communities.com>
Cc: java-interest@java.Eng.Sun.COM
Hi Jay,
> This code throws an exception if I run it from outside of the package in
> which the named class is defined:
>
> Class savedClass = Class.forName(className);
> Object madeguy = savedClass.newInstance();
It is probably because the class you are trying to instantiate
is not declared public.
Have fun,
Arthur van Hoff
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com