"Thinkinginjava" 22, get the environment variable of the system

Source: Internet
Author: User

/*** book: "Thinking in Java" * Function: Get the environment variable of the system * File: environmentvariables.java* time: April 8, 2015 19:39:08* Author: cutter_point*/ Package Lesson11holdingyourobjects;import Java.util.map;public class Environmentvariables {public static void main ( String [] args) {for (Map.entry entry:System.getenv (). EntrySet ()) {System.out.println (Entry.getkey () + ":" + Entry.getva Lue ());}}}



My system environment variables are exposed, haha:

Userprofile:c:\users\feng
Pathext:. COM;. EXE;. BAT;. CMD;. VBS;. VBE;. JS;. JSE;. WSF;. WSH;. MSC
Java_home:g:\program files\java\jdk1.8.0_40
Programdata:c:\programdata
ProgramFiles (X86): C:\Program Files (x86)
Temp:c:\users\feng\appdata\local\temp
Commonprogramfiles:c:\program Files\Common Files
HOMEDRIVE:C:
Processor_revision:3c03
SYSTEMDRIVE:C:
Userdomain:xiao
Allusersprofile:c:\programdata
Programw6432:c:\program Files
CommonProgramFiles (X86): C:\Program files (x86) \common files
Processor_identifier:intel64 Family 6 Model stepping 3, Genuineintel
Sessionname:console
Tmp:c:\users\feng\appdata\local\temp
Psmodulepath:c:\windows\system32\windowspowershell\v1.0\modules\
CLASSPATH:.; G:\Program Files\java\jdk1.8.0_40\lib\dt.jar; G:\Program Files\java\jdk1.8.0_40\lib\tools.jar
LogonServer: \\XIAO
Processor_architecture:amd64
Fp_no_host_check:no
Os:windows_nt
Path:g:\myeclipse Professional 2014\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\bin; G:\Android\android-sdk-windows\tools; G:\php5.6; G:\php5.6\ext; G:\orcale\xiaofeng\product\12.1.0\dbhome_1\bin; C:\Program Files (x86) \nvidia Corporation\physx\common; G:\Program Files\java\jdk1.8.0_40\bin; C:\ProgramData\Oracle\Java\javapath; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files (x86) \ Windows Kits\8.1\windows performance toolkit\; C:\Program Files\Microsoft SQL Server\110\tools\binn\; C:\Program files\mysql\mysql Enterprise Backup 3.11\; C:\Program Files (x86) \mysql\mysql Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\; C:\Program Files (x86) \mysql\mysql Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\doctrine extensions for Php\
HomePath: \users\feng
PROMPT: $P $g
Comspec:c:\windows\system32\cmd.exe
Commonprogramw6432:c:\program Files\Common Files
Processor_level:6
Userdomain_roamingprofile:xiao
Programfiles:c:\program Files
Localappdata:c:\users\feng\appdata\local
Vs120comntools:g:\program Files (x86) \microsoft Visual Studio 12.0\common7\tools\
Computername:xiao
Number_of_processors:8
Username:xiaofeng
Systemroot:c:\windows
Public:c:\users\public
Windir:c:\windows
Appdata:c:\users\feng\appdata\roaming


"Thinkinginjava" 22, get the environment variable of the system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.