I am trying to execute command line arguments via Java. For example:
// Execute command String command = \"cmd /c start cmd.exe\"; Process child = Runtime.ge
Each of your exec calls creates a process. You second and third calls do not run in the same shell process you create in the first one. Try putting all commands in a bat script and running it in one call: rt.exec("cmd myfile.bat"); or similar
rt.exec("cmd myfile.bat");