PRIVATE void createSessionWC3270(STRING sessionParms){ ProcessBuilder p = new ProcessBuilder(); File tempFile = new File("C:\\Program Files\\wc3270\\"); System.out.println("1: " + tempFile.getAbsolutePath()); IF (tempFile.exists()){ Thread openConsoleT = new Thread(new Runnable() { @Override public void run() { try { System.out.println("powershell \"& '" + "start cmd.exe /C \"C:\\Program Files\\wc3270\\wc3270.exe\" " + sessionParms + "'\""); PROCESS p = Runtime.getRuntime().exec("powershell \"& '" + "C:\\Program Files\\wc3270\\wc3270.exe " + sessionParms + "'\""); } catch (IOException e) { e.printStackTrace(); } } }); openConsoleT.start(); }ELSE{ tempFile = new File(("C:\\Program Files (x86)\\IBM\\wc3270\\")); IF (tempFile.exists()){ Thread openConsoleT = new Thread(new Runnable() { @Override public void run() { try { System.out.println("powershell \"& '" + "C:\\Program Files (x86)\\wc3270\\wc3270.exe " + sessionParms + "'\""); PROCESS p = Runtime.getRuntime().exec("powershell \"& '" + "C:\\Program Files (x86)\\wc3270\\wc3270.exe " + sessionParms + "'\""); } catch (IOException e) { e.printStackTrace(); } } }); openConsoleT.start(); } } // Process p = Runtime.getRuntime().exec("powershell \"& '" + "wc3270.exe" + sessionParms + "'\""); }