Java code obtains all system attributes

Source: Internet
Author: User

JavaCodeObtain all system attributes:

 

Properties props = system. getproperties ();

 

Iterator <entry <object, Object> it = props. entryset (). iterator ();

While (it. hasnext ()){

Entry <object, Object> ent = it. Next ();

System. Out. println (Ent. getkey () + ":" + Ent. getvalue ());

}

 

The output on my computer (MAC leopard 10.5.8) is as follows:

Java. runtime. Name: Java (TM) se Runtime Environment

Sun. boot. Library. Path:/system/library/frameworks/JavaVM. Framework/versions/1.6.0/Libraries

Java. VM. Version: 14.1-b02-92

AWT. nativedoublebuffering: True

Gopherproxyset: false

Java. VM. Vendor: Apple Inc.

Java. Vendor. url: http://www.apple.com/

Path. separator ::

Java. VM. Name: Java hotspot (TM) 64-bit server VM

File. encoding. PKG: Sun. Io

Sun. java. Launcher: sun_standard

User. Country: CN

Sun. OS. Patch. Level: Unknown

Java. VM. Specification. Name: Java virtual machine specification

User. dir:/users/mazhao/documents/Dropbox/development/Java/ebookmgr

Java. runtime. Version: 1.6.0 _ 15-b03-226

Java. AWT. graphicsenv: Apple. AWT. cgraphicsenvironment

Java. endorsed. dirs:/system/library/frameworks/JavaVM. Framework/versions/1.6.0/home/lib/endorsed

OS. Arch: x86_64

Java. Io. tmpdir:/var/folders/UA/ua4dejp9hbwok + 6 ulkeszk ++ Ti/-TMP -/

Line. separator:

 

Java. VM. Specification. Vendor: Sun Microsystems Inc.

OS. Name: Mac OS X

Sun. JNU. encoding: euc_cn

Java. Library. Path:.:/library/Java/extensions:/system/library/Java/extensions:/usr/lib/Java

Java. Specification. Name: Java platform API Specification

Java. Class. Version: 50.0

Sun. Management. Compiler: Hotspot 64-bit server Compiler

OS. Version: 10.5.8

HTTP. nonproxyhosts: Local | *. Local | 169.254/16 | *. 169.254/16

User. Home:/users/mazhao

User. timezone:

Java. AWT. printerjob: Apple. AWT. cprinterjob

File. encoding: UTF-8

Java. Specification. Version: 1.6

Java. class. path:/users/mazhao/documents/Dropbox/development/Java/ebookmgr/lib/officelnfs_2.7.jar: /users/mazhao/documents/Dropbox/development/Java/ebookmgr/build/classes:/users/mazhao/Documents ents/Dropbox/development/Java/ebookmgr/src

User. Name: mazhao

Java. VM. Specification. Version: 1.0

Java. Home:/system/library/frameworks/JavaVM. Framework/versions/1.6.0/home

Sun. Arch. Data. Model: 64

User. Language: ZH

Java. Specification. Vendor: Sun Microsystems Inc.

AWT. Toolkit: Apple. AWT. ctoolkit

Java.vm.info: Mixed Mode

Java. Version: 1.6.0 _ 15

Java. ext. dirs:/library/Java/extensions:/system/library/frameworks/JavaVM. framework/versions/1.6.0/home/lib/EXT

Sun. boot. class. path:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes/jsfd. jar:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes. jar:/system/library/frameworks/JavaVM. framework/frameworks/javaruntimesupport. framework/resources/Java/javaruntimesupport. jar:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes/UI. jar:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes/LAF. jar:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes/sunrsasign. jar:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes/JSSE. jar:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes/JCE. jar:/system/library/frameworks/JavaVM. framework/versions/1.6.0/classes/charsets. jar

Java. Vendor: Apple Inc.

File. separator :/

Java. Vendor. url. BUG: http://bugreport.apple.com/

Sun. Io. Unicode. encoding: unicodelittle

Sun. CPU. endian: Little

MrJ. Version: 1050.1.6.0 _ 15-226

Socksnonproxyhosts: Local | *. Local | 169.254/16 | *. 169.254/16

FTP. nonproxyhosts: Local | *. Local | 169.254/16 | *. 169.254/16

Sun. CPU. isalist:

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.