This class provides access to various base functions of system platforms.
Look in the
sys package for more system APIs.
Returns all the arguments that were passed in the command line. This does not include the interpreter or the name of the program file.
(java)(eval) On Windows, non-ASCII Unicode arguments will not work correctly.
(cs) Non-ASCII Unicode arguments will not work correctly.
Runs the given command. The command output will be printed to the same output as the current process.
The current process will block until the command terminates.
The return value is the exit code of the command (usually
0 indicates no error).
Command arguments can be passed in two ways:
argsto pass command arguments. Each argument will be automatically quoted and shell meta-characters will be escaped if needed.
cmdshould be an executable name that can be located in the
PATHenvironment variable, or a full path to an executable.
argsis not given or is
null, command arguments can be appended to
cmd. No automatic quoting/escaping will be performed.
cmdshould be formatted exactly as it would be when typed at the command line. It can run executables, as well as shell commands that are not executables (e.g. on Windows:
sys.io.Process API for more complex tasks, such as background processes, or providing input to the command.
Exits the current process with the given exit code.
(macro)(eval) Being invoked in a macro or eval context (e.g. with
--run) immediately terminates
the compilation process, which also prevents the execution of any
--next sections of compilation arguments.
Gets the current working directory (usually the one in which the program was started).
Returns the value of the given environment variable, or
null if it
Prints any value to the standard output, followed by a newline. On Windows, this function outputs a CRLF newline. LF newlines are printed on all other platforms.
Changes the current working directory.
(java) This functionality is not available on Java; calling this function will throw.
Returns the type of the current system. Possible values are: