You don't have to redirect it to a file.  You can get the input stream directly from the proc and read from there.
```java
BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream(), "UTF-8"));
String line = "";
while( ( line = reader.readLine() ) != null)
    yarn_class_path.append(line); 
proc.waitFor();
reader.close();
```