String command = sMemoryMonitor.replaceAll("<processID>", getOfficeProcessID());
String sPmapOutputFile = FileHelper.appendPath(m_aTempDir.getTempDir(), "pmap_" + _sMode + ".txt");
command = command.replaceAll("<pmapoutputfile>", sPmapOutputFile);
createExecutableFile(sOfficeMemoryCommand, command);
ProcessHandler processID = new ProcessHandler(sOfficeMemoryCommand);
processID.noOutput();
processID.executeSynchronously();
int nError = processID.getExitCode();
assertTrue("Execute of " + sOfficeMemoryCommand + " failed", nError == 0);
String text = processID.getOutputText();
if (text == null || text.equals("") || text.indexOf(' ') == -1)
{
fail("Could not determine Office memory usage. Check " + sOfficeMemoryCommand);
}
StringTokenizer aToken = new StringTokenizer(text);