Try:
Process p = Runtime.getRuntime().exec("cmd.exe");
InputStream is = p.getInputStream();
and then look at what you can read from the input stream
Rahul wrote:
> Hi,
> I want to execute dos commands from gwt. Reading from this forum I
> have to invoke the call from server not from the client.
> This is my server side code:
>
> public String greetServer()
> {
> try {
> Runtime.getRuntime().exec("cmd.exe");
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> return "Hello";
>
> }
>
> I am getting success at the client side that it was executed properly,
> but I have one question: should the dos prompt window open when i
> execute this program?? i tired putting cmd,cmd.exe but still the dos
> prompt doesnt open
> can anyone tell me what should i do ?
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---