I am trying to run the below command from java code using Process process =Runtime.getRuntime().exec(command) but getting the error.
Command: repo forall -c 'pwd;git status'
Error:'pwd;git: -c: line 0: unexpected EOF while looking for matching''`
I am able to run this command from linux terminal but when running from java the problem is with the space after pwd;git. Can anyone help me?
Processis not a command interpreter! What is more, don't useRuntime.exec(), use aProcessBuilder.