Runtime.getRuntime().exec(cmd /C start "C:/Documents and Settings/Shoby/Desktop/CMTHome\bin\execute.bat");
Any suggestions on how to solve this?
In addition to what Jos has said, this source code would not compile anyway.
there are double quotation marks missing in front of "cmd", and the quotation marks that you need inside the string because of the space in the folder name should be escaped this way: \"
And then I would not mix Unix and Windows path separators (normal slashes and backslashes) in the pathname. And I would not even hardcode them, but use File.SEPARATOR instead.
And why are you using "cmd" inside? I mean opening a shell that again opens a shell to execute your batch file, instead of executing it directly within a single shell?
I mean if only one window opens and then nothing happens then the problem could be that the "cmd" is not found by the system and therefore the second shell does not open. Remember that "cmd" is a file in the windows system directory and its name is "cmd.exe". So either the path is missing to this file (check the environment variable PATH or better: just give the whole path), or windows does not know what to do if you just give "cmd" without extension ".exe". So instead of using "cmd", try to use something like "c:\\windows\\system32\\cmd.exe". (Or better, don't use it at all and execute .bat file directly.)