How to run a Batch File using java in LINUX Environment For example in windows we can run like as given below. Process ps=Runtime.getRuntime().exec("cmd.exe /c C:/runbatch.bat"); How to run the same (I think .sh file) in Linux environment.Thanks in Advance
You can rush the shell (bash) as an interpreter by invoking it and providing a file of shell commands as an argument. So what we might normally enter on a command line to do this:
can be inserted in a Runtime.exec() statement.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson