public class System extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
exec(Object... words)
Executes an operating system command composed of a command and
one or more arguments.
|
static String |
exec(String line)
Executes a string as an operating system command.
|
static void |
sleep(int secs)
Waits for a specified number of seconds.
|
static void |
sleepMillis(int millis)
Waits for a specified number of milliseconds.
|
public static String exec(Object... words)
Each of the words values is treated as a single
(possibly quoted) word in a shell command.
The first argument is the filename
(either a full pathname, or the name of a file on the current path)
of an executable file.
These values can be numeric, or strings, or something else, and
are converted automatically to string values.
words - one or more words composing a shell command;
first is command and others are argumentsexec("/home/mbt/bin/process_obj.py", OBJ_NAME), exec("process_skycoords.py", RA, DEC), exec("process_sphericalcoords.sh", RA, DEC, 1.0)public static String exec(String line)
line - command line to executeexec("do_stuff.py " + RA + " " + DEC)public static void sleepMillis(int millis)
millis - number of milliseconds to waitpublic static void sleep(int secs)
secs - number of seconds to waitCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.