Process/ProcessBuilder

I am using scala.sys.process.Process to get a ProcessBuilder and execute a bash script. It works fine mostly but I have a bash script that I execute that takes too long and I get TimeoutException. I could not find any way to change the timeout value.

you can use waitFor() on the process instance which will wait in a synchronized manner until the script is fully executed.