ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Mark Bram <>
Subject Open new command window for ANT task
Date Sun, 30 May 2004 12:55:58 GMT
Hi All!

I am trying to write an Ant task capable of opening a new command window..
(for Dos or *nux).. Then I will use this to help with Jini tasks..

My first step is finding Java code to do such an ugly task!

When I try the following test:
public class Command
    public static void main (String [] args) throws Exception
       Runtime.getRuntime( ) .exec ( new String [] {"start", "cmd"});
    }  // end main method

}  // end Command class

I get:
F:\java\tests>javac && java Command
Exception in thread "main" CreateProcess: start cmd
         at java.lang.Win32Process.create(Native Method)
         at java.lang.Win32Process.<init>(
         at java.lang.Runtime.execInternal(Native Method)
         at java.lang.Runtime.exec(
         at java.lang.Runtime.exec(
         at java.lang.Runtime.exec(
         at Command.main(


Is there something that I am missing here?

Any help would be most appreciated!


Robert Mark Bram
B.Comp.(Systems Development/Business Systems)
Doctor of Philosophy Student

School of Network Computing
Faculty of Information Technology
Monash University
Peninsula Campus
McMahons Rd
Frankston, VIC 3199

Phone:  61 3 9904 4394
Facsimile:  61 3 9904 4124

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

View raw message