public class System
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
exec(java.lang.Object... words) |
Executes an operating system command composed of a command and
one or more arguments.
|
static java.lang.String |
exec(java.lang.String line) |
Executes a string as an operating system command.
|
public static java.lang.String exec(java.lang.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 java.lang.String exec(java.lang.String line)
line - command line to executeexec("do_stuff.py " + RA + " " + DEC)Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.