A string containing the home directory of the user.
Returns a nonempty list of immutable strings. The first element is
an implementation-specific name for the running top-level
The remaining elements are the command-line arguments,
as passed to the
main method (except for those
flags processed by Kawa itself).
The first element will depend on how the Kawa module was invoked. Kawa uses the following rules to determine the command name:
kawa.command.nameis set, that is used. This variable can be set on the
kawacommand line, for example from a script:
kawa -Dkawa.command.name="$0" foo "$@"
This variable is also set implicitly by the meta-arg option. FIXME.
kawa.command.lineis set, then we use that (after stripping off text that duplicates the remaining arguments). The
kawaprogram sets this property to the command line used to invoke it (specifically the contents of the entire
argvarray), before invoking the
sun.java.commandis set, then we use that (after stripping off text that duplicates the remaining arguments), and then prepending the string
"java ". The OpenJDK
javaprogram sets this property.
Any command-line arguments (following flags processed by Kawa itself) are assigned to the global variable ‘command-line-arguments’, which is a vector of strings.
Process any initial command-line options that set variables.
These have the form
Any such command-line options (at the start of the command-line)
are processed and removed from the command-line.
$ java kawa.repl -- abc=123 def #|kawa:1|# (write (command-line)) ("java kawa.repl --" "abc=123" "def") #|kawa:2|# (process-command-line-assignments) #|kawa:3|# (write (command-line)) ("java kawa.repl -- abc=123" "def") #|kawa:4|# abc 123
This function is mostly useful for Kawa applications
compiled with the
(It is used to set XQuery
Many operating systems provide each running process with
an environment conisting of environment variables.
(This environment is not to be confused with the
Scheme environments that can be passed to
Both the name and value of an environment variable are
strings. The procedure
returns the value of the environment variable name,
#f if the environment variable is not found.
(This uses the
It is an error to mutate the resulting string.
(get-environment-variable "PATH") ⇒ "/usr/local/bin:/usr/bin:/bin"
Returns the names and values of all the environment variables as an alist, where the car of each entry is the name of an environment variable, and the cdr is its value, both as strings. It is an error to mutate any of the strings or the alist itself.
(get-environment-variables) ⇒ (("USER" . "root") ("HOME" . "/"))