ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <>
Subject RE: Idea for future version
Date Fri, 13 Jul 2001 09:18:31 GMT
> -----Original Message-----
> From: François Lictevout [mailto:	

> I'm using Ant inside a java program, (for a task FTP), but there's a
> System.exit(0) in the main class.
> So my programs stops after the ant command.
> To solve the problem, I've downloaded the sources and deleted 
> the right
> line. It works now.
> However, I should do it for each new version.

Alternatively, you can change the security manager to avoid System.exit
calls when running Ant (or any class that might do a System.exit).

public class NullSecurityManager extends SecurityManager {
    public void checkExit(int status) {
    public void checkPermission( p) {

SecurityManager oldsm = System.getSecurityManager();
System.setSecurityManager(new NullSecurityManager());
try {;
} finally {


 Stéphane Bailliez 
 Software Engineer, Paris - France 
 iMediation - 
 Disclaimer: All the opinions expressed above are mine and not those from my

View raw message