473,395 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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
1 6914
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: aa | last post by:
Anybody know the solution to trailing space in argument of Runtime.getRuntime().exec(arg), Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler C:\\Documents and...
1
by: C. Allen Sher | last post by:
Has anyone ran the Unix "newgrp" command from a java Runtime object? I can't seem to get it to work the way it should.
5
by: JW | last post by:
Hi, I don't seem to get any results from the following use of Runtime.getRuntime().exec(cmd) using Java 1.4 on Redhat linux. Suppose that in the same directory as my java file below, I have...
5
by: Ayesha Ahsan | last post by:
Hi, I use Runtime.getRuntime().exec(command) to make my system call. For Windows based Dos, i add "cmd /c" before I type in my system call. So for example make the system call "dir": String...
1
by: Chad | last post by:
I need my java program to exec an external .exe file, but the problem is that this program being exec()'ed prompts the user for two pieces of information. I am trying to get my java program to...
2
by: uwnewsgroup | last post by:
When I was using Runtime.exec(String cmd) to run a unix utility (join), and try to get its standard output by using Process.getOutputStream(), it blocks forever. I tried it using Java 1.4 and...
1
by: wavespirit75 | last post by:
Hi, I wrote a program which will use ffmpeg to convert media files. Media files can be converted with this string array being passed in to Runtime.getRunTime().exec: String cmd = {ffmpeg path,...
1
by: prabhurangan | last post by:
Hi Members, I tried to execute "Runtime.getRuntime.exec("mysql -u username -ppassword databaseName < c:/data/backup.sql;" But this command is not restoring my database, instead if i run the...
3
by: Shayco | last post by:
hey, in my code i'm using Runtime.getRuntime().exec() in order to run a .bat file that calls another java program (they communicate with each other using RMI). when i call: Process process =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.