Das kannst Du wie folgt lösen:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public static List<String> tasklist(final String path) throws InterruptedException, IOException {
String process_line = "";
final List<String> processes = new ArrayList<>();
final Process process = Runtime.getRuntime().exec(System.getenv("windir") + "\\system32\\" + "tasklist.exe");
final BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream()));
while ((process_line = input.readLine()) != null) {
processes.add(process_line);
}
input.close();
return processes;
}