Provides structured information about the current ZPE process, runtime, operating system, display, environment variables, and available storage roots.
Availability: ZPE 1.14.11 is the first version to support the Environment module.
Module functions
The following is a list of all functions available in this module.
-
architecture
[1.14.11+]
Returns the operating-system architecture.
-
cwd
[1.14.11+]
Returns the current working directory.
-
executable
[1.14.11+]
Returns the path of the running ZPE executable or installation.
-
get
[1.14.11+]
Returns an environment variable, or the optional default when it is not set.
-
get_display_bit_depth
[1.14.11+]
Returns the bit depth of the display.
-
get_display_height
[1.14.11+]
Returns the height of the display.
-
get_display_refresh_rate
[1.14.11+]
Returns the refresh rate of the display.
-
get_display_width
[1.14.11+]
Returns the width of the display.
-
home
[1.14.11+]
Returns the current user's home directory.
-
is_command_line
[1.14.11+]
Returns whether the application is running in command-line mode.
This functionality was originally available as a predefined function from ZPE 1.14.4, before it became a function of the Environment module.
-
is_headless
[1.14.11+]
Returns whether the application is running in headless mode.
This functionality was originally available as a predefined function from ZPE 1.14.4, before it became a function of the Environment module.
-
is_linux
[1.14.11+]
Returns whether the application is running on Linux.
-
is_mac
[1.14.11+]
Returns whether the application is running on macOS.
-
is_native
[1.14.11+]
Returns whether the application is running in native image (ZPEX) mode.
-
is_windows
[1.14.11+]
Returns whether the application is running on Windows.
-
list_drives
[1.14.11+]
Lists all drives or root directories on this system.
This functionality was originally available as a predefined function from ZPE 1.8.6, before it became a function of the Environment module.
-
locale
[1.14.11+]
Returns the default process locale as a language tag.
-
memory
[1.14.11+]
Returns current JVM memory values in bytes as free, total, and max.
-
os
[1.14.11+]
Returns the operating-system name.
This functionality was originally available as a predefined function from ZPE 1.3.2, before it became a function of the Environment module.
-
processors
[1.14.11+]
Returns the number of processors available to the JVM.
-
runtime
[1.14.11+]
Returns Java and ZPE runtime information as a map.
-
shell
[1.14.11+]
Returns the configured command shell when available.
-
temp
[1.14.11+]
Returns the system temporary directory.
-
user
[1.14.11+]
Returns the current operating-system username.
-
variables
[1.14.11+]
Returns all environment variables as a map.
Module constants
The following is a list of all constants available in this module.
- AVAILABLE_PROCESSORS
- JAVA_HOME
- JAVA_VENDOR
- JAVA_VERSION
- MAX_MEMORY
- OS_ARCH
- OS_NAME
- OS_VERSION
- USER_HOME
- USER_NAME

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days. Your email address is stored so that replies can be sent to your email address.
Comments powered by BalfComment