Runtimert=Runtime.getRuntime();Processprcs=rt.exec(ew);//Executa o comando no shell ou DOSInputStreamReaderisr=newInputStreamReader(prcs.getInputStream());BufferedReaderbr=newBufferedReader(isr);Stringline;//Le a resposta do comando linha por linha.while((line=br.readLine())!=null)retorno+=line+"\n";returnretorno;}catch(IOExceptionioe){System.out.println(ioe.getMessage());mretorno='Erro';}returnretorno;}