ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Walend <dwal...@eecs.tufts.edu>
Subject Re: Executing java via ExecuteJava raising an IllegalAccessError?
Date Sat, 09 Sep 2000 15:13:59 GMT
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