Java programming ideology _ 004 get the runtime environment

Source: Internet
Author: User
Package WZS. test2; // obtain the runtime environment public class test_wzs1 {public static void main (string [] ARGs) {system. getproperties (). list (system. out); system. out. println ("\ nuser. name = "+ system. getproperty ("user. name "); system. out. println ("Java. home = "+ system. getproperty ("Java. home "));}}

Output result:

-- listing properties --java.runtime.name=Java(TM) SE Runtime Environmentsun.boot.library.path=C:\Program Files\Java\jdk1.6.0\jre\binjava.vm.version=1.6.0-b105java.vm.vendor=Sun Microsystems Inc.java.vendor.url=http://java.sun.com/path.separator=;java.vm.name=Java HotSpot(TM) Client VMfile.encoding.pkg=sun.iouser.country=CNsun.java.launcher=SUN_STANDARDsun.os.patch.level=Service Pack 3java.vm.specification.name=Java Virtual Machine Specificationuser.dir=D:\workspace\zthinkinjavaTestjava.runtime.version=1.6.0-b105java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironmentjava.endorsed.dirs=C:\Program Files\Java\jdk1.6.0\jre\li...os.arch=x86java.io.tmpdir=C:\DOCUME~1\WWX154~1\LOCALS~1\Temp\line.separator=java.vm.specification.vendor=Sun Microsystems Inc.user.variant=os.name=Windows XPsun.jnu.encoding=GBKjava.library.path=C:\Program Files\Java\jdk1.6.0\jre\bi...java.specification.name=Java Platform API Specificationjava.class.version=50.0sun.management.compiler=HotSpot Client Compileros.version=5.1user.home=C:\Documents and Settings\wWX154783user.timezone=java.awt.printerjob=sun.awt.windows.WPrinterJobfile.encoding=GBKjava.specification.version=1.6user.name=wWX154783java.class.path=D:\workspace\zthinkinjavaTest\binjava.vm.specification.version=1.0sun.arch.data.model=32java.home=C:\Program Files\Java\jdk1.6.0\jrejava.specification.vendor=Sun Microsystems Inc.user.language=zhawt.toolkit=sun.awt.windows.WToolkitjava.vm.info=mixed mode, sharingjava.version=1.6.0java.ext.dirs=C:\Program Files\Java\jdk1.6.0\jre\li...sun.boot.class.path=C:\Program Files\Java\jdk1.6.0\jre\li...java.vendor=Sun Microsystems Inc.file.separator=\java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...sun.cpu.endian=littlesun.io.unicode.encoding=UnicodeLittlesun.desktop=windowssun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+m...user.name=wWX154783java.home=C:\Program Files\Java\jdk1.6.0\jre

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.