ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Medinets" <medi...@mtolive.com>
Subject Re: Executing java via ExecuteJava raising an IllegalAccessError?
Date Sat, 09 Sep 2000 15:27:23 GMT
Hi. Why is using System.exit() foolish? What should be used instead? Are you
referring to thinging like handling unrecoverable exceptions that should be
thrown up the chain or to exceptions like files not being found that could
be handled directly?

----- Original Message -----
From: "David Walend" <dwalend@eecs.tufts.edu>
To: "ant" <ant-dev@jakarta.apache.org>
Sent: Saturday, September 09, 2000 11:13 AM
Subject: Re: Executing java via ExecuteJava raising an IllegalAccessError?


> On Fri, 8 Sep 2000, Steve Loughran wrote:
>
> > I've been wrapping someone else's code up in ExecuteJava because a) they
> > foolishly used System.exit() wherever they could and b) I need to adjust
the
> > classpath.
> >
> > Although I can load and invoke their main() method fine, I get
IllegalAccess
> > errors on the package scop methods they invoke on other classes in the
same
> > package.
> >
> > Has anyone else encountered this little problem and any suggestions to a
> > workaround?
>
> Steve,
>
> I haven't tried this from inside ant yet, and haven't hit this specific
> problem before but...
>
> I've gotten around other people's calling System.exit() by using a
> security policy that won't let them do it. Then, the security exception
> bubbles politely out of their code to some point where I can catch it. Not
> really in the theme of the java security kit, but is a nice hack.
>
> Hope that helps,
>
> Dave
>


Mime
View raw message