Created
March 10, 2022 18:32
-
-
Save joewiz/2506adc9efbeed33c9412b4854e18712 to your computer and use it in GitHub Desktop.
Display all system properties and their values - for eXist-db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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