By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,595 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

cmd.exe doesn't pop up with Runtime.getRuntime.exec!

P: n/a
Hello,

I searched this java newsgroup and tried all suggestions, but still
failed.
I keep watch a task manager, but cmd.exe never running.
All I want to do is run and pop up the cmd.exe using Runtime on
Windows 2000, so I can use it.
I tried all below cases.

String cmd = "C:\WINNT\system32\cmd.exe";
cmd = "cmd.exe";
cmd = "cmd";
cmd = "\"C:\\WINNT\\system32\\cmd.exe\"";
cmd = "C:/WINNT/system32/cmd.exe";

Process proc = Runtime.getRuntime().exec(cmd);

None of them pop up the cmd.exe for me.
Any help please?
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You might try the following command:

String cmd = "C:\WINNT\system32\cmd.exe /c start";

regards,
Steve
"maya2000" <me*******@hotmail.com> wrote in message
news:29**************************@posting.google.c om...
Hello,

I searched this java newsgroup and tried all suggestions, but still
failed.
I keep watch a task manager, but cmd.exe never running.
All I want to do is run and pop up the cmd.exe using Runtime on
Windows 2000, so I can use it.
I tried all below cases.

String cmd = "C:\WINNT\system32\cmd.exe";
cmd = "cmd.exe";
cmd = "cmd";
cmd = "\"C:\\WINNT\\system32\\cmd.exe\"";
cmd = "C:/WINNT/system32/cmd.exe";

Process proc = Runtime.getRuntime().exec(cmd);

None of them pop up the cmd.exe for me.
Any help please?

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.