获取Scala中所有环境和系统属性,(System.getProperties System.getenv

import scala.collection.JavaConverters._

    //properties
    println("**** System.getProperties():")
    println(System.getProperties.asScala.mkString(System.lineSeparator()))
    //.getenv()
    println("**** System.getenv():")
    println(System.getenv().asScala.mkString(System.lineSeparator()))

**** System.getProperties():
java.runtime.name -> Java(TM) SE Runtime Environment
sun.boot.library.path -> D:\softwares\Java\jdk1.8.0_131\jre\bin
java.vm.version -> 25.131-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 -> CN
user.script -> 
sun.java.launcher -> SUN_STANDARD
sun.os.patch.level -> 
java.vm.specification.name -> Java Virtual Machine Specification
user.dir -> D:\git\SearchRcmDemo\Offline\Utils\SRFlow
java.runtime.version -> 1.8.0_131-b11
java.awt.graphicsenv -> sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs -> D:\softwares\Java\jdk1.8.0_131\jre\lib\endorsed
os.arch -> amd64
java.io.tmpdir -> C:\Users\Code_LT~1\AppData\Local\Temp\
line.separator -> 

java.vm.specification.vendor -> Oracle Corporation
user.variant -> 
os.name -> Windows 10
sun.jnu.encoding -> GBK
java.library.path -> D:\softwares\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Windows\System32\HWAudioDriverLibs;C:\Windows\System32\HWAudioDriver\;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\softwares\TortoiseGit\bin;D:\softwares\Git\cmd;D:\softwares\TortoiseSVN\bin;D:\softwares\NetSarang\Xshell 7\;D:\softwares\NetSarang\Xftp 7\;D:\softwares\Java\jdk1.8.0_131\bin;D:\softwares\Java\jdk1.8.0_131\jre\bin;D:\softwares\scala\bin;D:\softwares\apache-maven-3.6.3\bin;D:\softwares\hadoop-2.7.7;D:\softwares\hadoop-2.7.7\bin;D:\softwares\Redis\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;D:\softwares\nodejs\;D:\softwares\Graphviz\bin;D:\softwares\Go\bin;D:\softwares\scala\bin;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;D:\softwares\Python\Python37\Scripts\;D:\softwares\Python\Python37\;D:\softwares\JetBrains\PyCharm 2021.1.3\bin;D:\softwares\JetBrains\IntelliJ IDEA 2021.1.3\bin;C:\Users\Code_LT\AppData\Roaming\npm;D:\softwares\JetBrains\GoLand 2022.2.3\bin;D:\softwares\JetBrains\CLion 2022.2.3\bin;C:\Users\Code_LT\AppData\Local\Microsoft\WindowsApps;.
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\Code_LT
user.timezone -> Asia/Shanghai
java.awt.printerjob -> sun.awt.windows.WPrinterJob
file.encoding -> UTF-8
java.specification.version -> 1.8
java.class.path -> C:\Users\Code_LT\AppData\Roaming\JetBrains\IntelliJIdea2021.1\plugins\Scala\lib\runners.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\charsets.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\deploy.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\javaws.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\jce.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\jfr.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\jsse.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\management-agent.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\plugin.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\resources.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\rt.jar;D:\git\SearchRcmDemo\Offline\Utils\SRFlow\framework\target\test-classes;(太长省略。。)
user.name -> Code_LT
java.vm.specification.version -> 1.8
sun.java.command -> org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner -s BasicTest -testName system -showProgressMessages true
java.home -> D:\softwares\Java\jdk1.8.0_131\jre
sun.arch.data.model -> 64
user.language -> zh
java.specification.vendor -> Oracle Corporation
awt.toolkit -> sun.awt.windows.WToolkit
java.vm.info -> mixed mode
java.version -> 1.8.0_131
java.ext.dirs -> D:\softwares\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
sun.boot.class.path -> D:\softwares\Java\jdk1.8.0_131\jre\lib\resources.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\rt.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\jsse.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\jce.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\charsets.jar;D:\softwares\Java\jdk1.8.0_131\jre\lib\jfr.jar;D:\softwares\Java\jdk1.8.0_131\jre\classes
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




**** System.getenv():
USERDOMAIN_ROAMINGPROFILE -> CHINA
PROCESSOR_LEVEL -> 6
SESSIONNAME -> Console
ALLUSERSPROFILE -> C:\ProgramData
PROCESSOR_ARCHITECTURE -> AMD64
PSModulePath -> %ProgramFiles%\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
SystemDrive -> C:
USERNAME -> Code_LT
USERDNSDOMAIN -> CHINA.HUAWEI.COM
MOSQUITTO_DIR -> C:\Program Files (x86)\ISEP\bin
ProgramFiles(x86) -> C:\Program Files (x86)
FPS_BROWSER_USER_PROFILE_STRING -> Default
PATHEXT -> .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
DriverData -> C:\Windows\System32\Drivers\DriverData
PcAccess -> C:\Program Files (x86)\PcAccess\
CLion -> D:\softwares\JetBrains\CLion 2022.2.3\bin;
GOPATH -> D:\git\GoWork\go
ProgramData -> C:\ProgramData
ProgramW6432 -> C:\Program Files
HOMEPATH -> \Users\Code_LT
PROCESSOR_IDENTIFIER -> Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
HADOOP_HOME -> D:\softwares\hadoop-2.7.7
M2_HOME -> D:\softwares\apache-maven-3.6.3
ProgramFiles -> C:\Program Files
PUBLIC -> C:\Users\Public
windir -> C:\WINDOWS
=:: -> ::\
ZES_ENABLE_SYSMAN -> 1
LOCALAPPDATA -> C:\Users\Code_LT\AppData\Local
IntelliJ IDEA -> D:\softwares\JetBrains\IntelliJ IDEA 2021.1.3\bin;
USERDOMAIN -> CHINA
FPS_BROWSER_APP_PROFILE_STRING -> Internet Explorer
LOGONSERVER -> \\KWEPADDC00066
JAVA_HOME -> D:\softwares\Java\jdk1.8.0_131
OneDrive -> C:\Users\Code_LT\OneDrive
APPDATA -> C:\Users\Code_LT\AppData\Roaming
SCALA_HOME -> D:\softwares\scala
CommonProgramFiles -> C:\Program Files\Common Files
Path -> C:\Windows\System32\HWAudioDriverLibs;C:\Windows\System32\HWAudioDriver\;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\softwares\TortoiseGit\bin;D:\softwares\Git\cmd;D:\softwares\TortoiseSVN\bin;D:\softwares\NetSarang\Xshell 7\;D:\softwares\NetSarang\Xftp 7\;D:\softwares\Java\jdk1.8.0_131\bin;D:\softwares\Java\jdk1.8.0_131\jre\bin;D:\softwares\scala\bin;D:\softwares\apache-maven-3.6.3\bin;D:\softwares\hadoop-2.7.7;D:\softwares\hadoop-2.7.7\bin;D:\softwares\Redis\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;D:\softwares\nodejs\;D:\softwares\Graphviz\bin;D:\softwares\Go\bin;D:\softwares\scala\bin;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;D:\softwares\Python\Python37\Scripts\;D:\softwares\Python\Python37\;D:\softwares\JetBrains\PyCharm 2021.1.3\bin;D:\softwares\JetBrains\IntelliJ IDEA 2021.1.3\bin;C:\Users\Code_LT\AppData\Roaming\npm;D:\softwares\JetBrains\GoLand 2022.2.3\bin;D:\softwares\JetBrains\CLion 2022.2.3\bin;C:\Users\Code_LT\AppData\Local\Microsoft\WindowsApps
PyCharm -> D:\softwares\JetBrains\PyCharm 2021.1.3\bin;
OS -> Windows_NT
COMPUTERNAME -> DESKTOP-OMPMMME
PROCESSOR_REVISION -> 8c01
CLASSPATH -> .;D:\softwares\Java\jdk1.8.0_131\lib\dt.jar;D:\softwares\Java\jdk1.8.0_131\lib\tools.jar
CommonProgramW6432 -> C:\Program Files\Common Files
ComSpec -> C:\WINDOWS\system32\cmd.exe
SystemRoot -> C:\WINDOWS
TEMP -> C:\Users\Code_LT~1\AppData\Local\Temp
HOMEDRIVE -> C:
USERPROFILE -> C:\Users\Code_LT
TMP -> C:\Users\Code_LT~1\AppData\Local\Temp
CommonProgramFiles(x86) -> C:\Program Files (x86)\Common Files
NUMBER_OF_PROCESSORS -> 8
GoLand -> D:\softwares\JetBrains\GoLand 2022.2.3\bin;
IDEA_INITIAL_DIRECTORY -> C:\Users\Code_LT\Desktop


你可能感兴趣的:(Scala,scala,开发语言,后端)