if(!remoteRoot.exists())
remoteRoot.mkdirs();
try {// does Java exist?
logger.println("Checking if Java exists");
WindowsRemoteProcessLauncher wrpl = new WindowsRemoteProcessLauncher(name,auth);
Process proc = wrpl.launch("java -fullversion","c:\\");
proc.getOutputStream().close();
IOUtils.copy(proc.getInputStream(),logger);
proc.getInputStream().close();
int exitCode = proc.waitFor();
if (exitCode==1) {// we'll get this error code if Java is not found