lang/java

Java System.getenv

C/H 2023. 6. 8. 08:56
package org.example.environment;

import java.util.Map;

public class Env {
    public static void main(String[] args){
        Map<String, String> envs = System.getenv();
        for(String key: envs.keySet()){
            System.out.printf("System.getenv(\"%s\"): %s\n", key, System.getenv(key));
        }
    }
}
> Task :Env.main()
System.getenv("USERDOMAIN_ROAMINGPROFILE"): USERGROUP
System.getenv("PROCESSOR_LEVEL"): 6
System.getenv("SESSIONNAME"): Console
System.getenv("ALLUSERSPROFILE"): C:\ProgramData
System.getenv("PROCESSOR_ARCHITECTURE"): AMD64
System.getenv("GIT_INSTALL_ROOT"): C:\ProgramData\scoop\apps\git\current
System.getenv("ANDROID_HOME"): C:\Users\ch\scoop\apps\android-sdk\current
System.getenv("PSModulePath"): %ProgramFiles%\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
System.getenv("SystemDrive"): C:
System.getenv("USERNAME"): username
System.getenv("USERDNSDOMAIN"): USERGROUP.NET
System.getenv("ProgramFiles(x86)"): C:\Program Files (x86)
System.getenv("TOOLBOX_VERSION"): 1.28.1.15219
System.getenv("PATHEXT"): .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
System.getenv("DriverData"): C:\Windows\System32\Drivers\DriverData
System.getenv("GEM_HOME"): C:\Users\username\scoop\apps\ruby\current\gems
System.getenv("ProgramData"): C:\ProgramData
System.getenv("ProgramW6432"): C:\Program Files
System.getenv("OS"): Windows_NT
....
반응형

'lang > java' 카테고리의 다른 글

Java isInstance  (0) 2023.06.08
Java Optional  (0) 2023.06.07
Java Date Offset  (0) 2023.06.07
Java - 2 ArrayList join LinkedHapMap Filter to CSV String  (0) 2022.02.23
java filter speed Test  (0) 2021.12.31