Starting the JAVA process and wait for it

Before this commit, we were using cmd.Run() which will launch the
process, wait for it to exit and copy the stdout and stderr. This was
not working well for live stdout. We will get stdout only when the
process stops.

With this commit, we use cmd.Start() which will start the process in
background and call cmd.Wait() on it. This fixes the stdout issue