ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramesh M <ramesh_mb...@yahoo.com>
Subject Batch file execution fails on Win XP with java.io.Exception error=2
Date Wed, 18 Jan 2006 12:34:11 GMT
I have the folllowing fragment in an ant extension
class.

String executable =3D "somebatchfile";
commandline =3D new Commandline();
commandline.setExecutable(executable)
Command c =3D new Command(commandline);
c.displayPrompt();
c.setDir(testDomain);
c.displayMake();
c.run();

Where the "somebatchfile" comes from the build file.
It does not 
have any extension.
On executing it on Windows XP I get the following
error 
 Cannot execute C:\somebatchfile: java.io.IOException:

CreateProcess: C:\somebatchfile.sh error=3D2 . The
somebatchfile.cmd 
is available on the folder, but it looks like it is
looking for 
a .sh file by default. 
Any work around for this? The same works on Windows NT
& Solaris
(With a somebatchfile.sh in the folder).
Thanks,
Ramesh.

Regards,
Ramesh 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message