ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sharad Jain <>
Subject Suppressing DOS window when calling Ant from Java
Date Mon, 15 Nov 2004 23:00:15 GMT
I am trying to embed Ant into my application.
The following code gives me what I need.

executeAnt(String antfile, String target, PrintStream myOut, PrintStream 
myErr, int logLevel)
        ProjectHelper helper = ProjectHelper.getProjectHelper();
        Project project = new Project();

        DefaultLogger logger = new DefaultLogger();
//        CommonsLoggingListener logger = new CommonsLoggingListener();
        helper.parse(project, new File(antfile));

I am able to get it working with proper logging etc.
However, I have one annoyance that I cant get rid of.
When I run this code on Windows machine, a command-windows flashes
when project.executeTarget() gets called. I believe, this is because of 
some kind
of System.out / System.err binding that happens inside createLogger() of ...

I know most IDE(s) (Eclipse/JBuilder) have AntRunner which are modified 
version of and they are able to suppress DOS-window.
I dont know how ?
Any directions will be appreciated.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message