I want to get a process\' output (Git.exe to be exact) and convert it to a String object. Previously sometimes my code was blocked. Then I figured out that it\'s be
Git.exe
Use ProcessBuilder or Apache commons-exec.
Your posted code has bugs, this is a hard topic to get right.