Я использовал java -XshowSettings:all
, чтобы получить список всех свойств, которые установлены виртуальной машиной, и из этого я разработал следующее:
(def system-properties {
:awt.toolkit (System/getProperty "awt.toolkit"),
:file.encoding (System/getProperty "file.encoding"),
:file.encoding.pkg (System/getProperty "file.encoding.pkg"),
:file.separator (System/getProperty "file.separator"),
:java.awt.graphicsenv (System/getProperty "java.awt.graphicsenv"),
:java.awt.printerjob (System/getProperty "java.awt.printerjob"),
:java.class.path (System/getProperty "java.class.path"),
:java.class.version (System/getProperty "java.class.version"),
:java.endorsed.dirs (System/getProperty "java.endorsed.dirs"),
:java.ext.dirs (System/getProperty "java.ext.dirs"),
:java.home (System/getProperty "java.home"),
:java.io.tmpdir (System/getProperty "java.io.tmpdir"),
:java.library.path (System/getProperty "java.library.path"),
:java.runtime.name (System/getProperty "java.runtime.name"),
:java.runtime.version (System/getProperty "java.runtime.version"),
:java.specification.name (System/getProperty "java.specification.name"),
:java.specification.vendor (System/getProperty "java.specification.vendor"),
:java.specification.version (System/getProperty "java.specification.version"),
:java.vendor (System/getProperty "java.vendor"),
:java.vendor.url (System/getProperty "java.vendor.url"),
:java.vendor.url.bug (System/getProperty "java.vendor.url.bug"),
:java.version (System/getProperty "java.version"),
:java.vm.info (System/getProperty "java.vm.info"),
:java.vm.name (System/getProperty "java.vm.name"),
:java.vm.specification.name (System/getProperty "java.vm.specification.name"),
:java.vm.specification.vendor (System/getProperty "java.vm.specification.vendor"),
:java.vm.specification.version (System/getProperty "java.vm.specification.version"),
:java.vm.vendor (System/getProperty "java.vm.vendor"),
:java.vm.version (System/getProperty "java.vm.version"),
:line.separator (System/getProperty "line.separator"),
:os.arch (System/getProperty "os.arch"),
:os.name (System/getProperty "os.name"),
:os.version (System/getProperty "os.version"),
:path.separator (System/getProperty "path.separator"),
:sun.arch.data.model (System/getProperty "sun.arch.data.model"),
:sun.boot.class.path (System/getProperty "sun.boot.class.path"),
:sun.boot.library.path (System/getProperty "sun.boot.library.path"),
:sun.cpu.endian (System/getProperty "sun.cpu.endian"),
:sun.cpu.isalist (System/getProperty "sun.cpu.isalist"),
:sun.desktop (System/getProperty "sun.desktop"),
:sun.io.unicode.encoding (System/getProperty "sun.io.unicode.encoding"),
:sun.java.launcher (System/getProperty "sun.java.launcher"),
:sun.jnu.encoding (System/getProperty "sun.jnu.encoding"),
:sun.management.compiler (System/getProperty "sun.management.compiler"),
:sun.os.patch.level (System/getProperty "sun.os.patch.level"),
:sun.stdout.encoding (System/getProperty "sun.stdout.encoding"),
:user.country (System/getProperty "user.country"),
:user.dir (System/getProperty "user.dir"),
:user.home (System/getProperty "user.home"),
:user.language (System/getProperty "user.language"),
:user.name (System/getProperty "user.name"),
:user.script (System/getProperty "user.script"),
:user.timezone (System/getProperty "user.timezone"),
:user.variant (System/getProperty "user.variant")})
Удачи.
EDIT
Или, что еще проще - вызов (System/getProperties)
возвращает карту с ключом имени свойства в виде строки. В моей системе я возвращаюсь
{"java.runtime.name" "Java(TM) SE Runtime Environment",
"sun.boot.library.path" "C:\\Program Files\\Java\\jre1.8.0_171\\bin",
"java.vm.version" "25.171-b11",
"java.vm.vendor" "Oracle Corporation",
"java.vendor.url" "http://java.oracle.com/",
"path.separator" ";",
"java.vm.name" "Java HotSpot(TM) 64-Bit Server VM",
"file.encoding.pkg" "sun.io",
"user.country" "US",
"user.script" "",
"sun.java.launcher" "SUN_STANDARD",
"sun.os.patch.level" "",
"java.vm.specification.name" "Java Virtual Machine Specification",
"user.dir" "C:\\WINDOWS\\system32",
"java.runtime.version" "1.8.0_171-b11",
"java.awt.graphicsenv" "sun.awt.Win32GraphicsEnvironment",
"java.endorsed.dirs" "C:\\Program Files\\Java\\jre1.8.0_171\\lib\\endorsed",
"os.arch" "amd64",
"java.io.tmpdir" "C:\\Users\\whatever\\AppData\\Local\\Temp\\",
"line.separator" "\r\n",
"java.vm.specification.vendor" "Oracle Corporation",
"user.variant" "",
"os.name" "Windows 10",
"sun.jnu.encoding" "Cp1252",
"java.library.path" "C:\\Program Files\\Java\\jre1.8.0_171\\bin;C:\\WINDOWS\\Sun\\Java\\bin;.",
"java.specification.name" "Java Platform API Specification",
"java.class.version" "52.0",
"sun.management.compiler" "HotSpot 64-Bit Tiered Compilers",
"os.version" "10.0",
"user.home" "C:\\Users\\whatever",
"user.timezone" "America/New_York",
"java.awt.printerjob" "sun.awt.windows.WPrinterJob",
"file.encoding" "Cp1252",
"java.specification.version" "1.8",
"java.class.path" "C:\\Users\\...etc...",
"user.name" "whatever",
"java.vm.specification.version" "1.8",
"sun.java.command" "clojure.main",
"java.home" "C:\\Program Files\\Java\\jre1.8.0_171",
"sun.arch.data.model" "64",
"user.language" "en",
"java.specification.vendor" "Oracle Corporation",
"awt.toolkit" "sun.awt.windows.WToolkit",
"java.vm.info" "mixed mode",
"java.version" "1.8.0_171",
"java.ext.dirs" "C:\\Program Files\\Java\\jre1.8.0_171\\lib\\ext;...etc...",
"java.vendor" "Oracle Corporation",
"file.separator" "\\",
"java.vendor.url.bug" "http://bugreport.sun.com/bugreport/",
"sun.io.unicode.encoding" "UnicodeLittle",
"sun.cpu.endian" "little",
"sun.desktop" "windows",
"sun.cpu.isalist" "amd64"}