naved momin wrote:
but still this is also not working ,
now what should be wrong
I have to agree with Joanne; you need to look at the 'cmd.exe' options.
You have 2 basic typos going on here. When you try to execute programs on any operating system through Java, you NEED to specify the complete file name (including the extension --> cmd.exe).
The other problem is your second argument in the array. It has a slash at the start. Based on previous replies above, it seems you're being recommended to give the 'cmd.exe' program to have a '/C' option, THEN the path to the .bat file. Basically, 3 arguments but you're giving it 2 and those have typos in them.
On Windows, if you get a return code 2 (for missing file), you'll need to fix the path to the file.
CNH