Hi Ranchers I hope this is the right forum for my question. Let me state the problem I have at hand.... I have a batch file abc.bat with following lines: cd c:\GoToDestination java -cp runNewProgram How to execute a batch file from my program? TIA Ravi
You can use the Runtime class to execute the batch file. Use getRuntime() to access the current runtime environment as you cant create your own instance of the runtime class. The following is the code: