String[] aArgs = { "perl", "-e", "print \"Hello World\"" }; Runtime oRuntime = Runtime.getRuntime(); Process oProcess; try { oProcess = oRuntime.exec(aArgs); } catch (Exception e) { System.out.println("error executing " + aArgs[0]); } OutputStream oOut = oProcess.getOutputStream;