Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Java System Command Execution
Name: chrisjasp Date: December 15, 2004 at 10:58:03 Pacific OS: Linux CPU/Ram: 1.3
Comment:
Does anyone know if there is a way to execute a system command in the background from java? I can execute it using the System objec with exec. I want to execute it as if you typed >ls & at the command prompt. When you put the & in the exec string it thinks its an argument part of the command. Any help would be appreciated.
Summary: Im pretty new to java so bear with me. I already know how to execute a system command with the Runtime class. My questions is, Is there a way if the command you execute promts for more input that cann...
Summary: In its simplest form, exec() is quite easy to use: Process p = Runtime.getRuntime().exec("/bin/ls"); "The problem with this form is that it gets you nowhere. When Java forks a new process it redirect...