Runtime run = Runtime.getRuntime();
Process process = null;
process = run.exec("java");
int exitValue = -1;
InputStream errorIn = process.getErrorStream();
InputStreamReader streamReader = new InputStreamReader(errorIn);
BufferedReader bufferedReader = new BufferedReader(streamReader);
InputStream inIn = process.getInputStream();
os = process.getOutputStream();
readInput = new WriteTo(inIn, this);
readError = new WriteTo(errorIn, this);
Thread threadError = new Thread(readError);
Thread threadIn = new Thread(readInput);