Skip to content

Instantly share code, notes, and snippets.

@joewiz
Created March 10, 2022 18:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joewiz/2506adc9efbeed33c9412b4854e18712 to your computer and use it in GitHub Desktop.
Save joewiz/2506adc9efbeed33c9412b4854e18712 to your computer and use it in GitHub Desktop.
Display all system properties and their values - for eXist-db
xquery version "3.1";
(: @see https://exist-db.org/exist/apps/fundocs/index.html?q=util:system-property
: @see https://github.com/eXist-db/exist/blob/develop/exist-core/src/main/resources-filtered/org/exist/system.properties
:)
let $exist-properties :=
(
"vendor",
"vendor-url",
"product-name",
"product-version",
"product-build",
"git-branch",
"git-commit"
)
(: @see https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html :)
let $java-system-properties :=
(
"file.separator",
"java.class.path",
"java.home",
"java.vendor",
"java.vendor.url",
"java.version",
"line.separator",
"os.arch",
"os.name",
"os.version",
"path.separator",
"user.dir",
"user.home",
"user.name"
)
return
map:merge(($exist-properties, $java-system-properties) ! map:entry(., util:system-property(.)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment