This article is shared with a method to show Java to get related parameters through a code:
Public Static void main (String [] args) {Properties Props = System.getProperties (); // System attribute System.out.println ("The operating environment of Java ("java.version") ; System.out.println ("Java's operating environment supplier:"+PROPS.GetProperty ("Java.vendor"); System.out.println ("The URL of Java supplier:"+Progs.GetProperty ("Java .Vendor.url ")); System.out.println (" Java installation path: "+Props.Getproperty (" Java.home "); System.out.println (" Java virtual machine specification version: "++ Props.getProperty ("Java.vm.Specification.version"); System.out.println ("" Java virtual machine specification supplier: "+Progs.getProperty (" Java.vm.Spect.vend or ")); Systemm .out.println ("Java's virtual machine specification name:"+PROPS.GetProperty ("Java.vm.Specification.name"); Ty ("" java.vm.version "); System.out.println (" Java's virtual machine realizes supplier: "+PROPS.GetProperty (" java.vm.vendor "); System.out.println (" Java The name of the virtual machine implementation: "+Props.getProperty (" Java.vm.name "); System.out.println (" Java Running Environment Specification Version: "+Props.getProperty (" Java.SpeCification.verse ")) );; ""+Props.GetProperty ("+Progs.GetProperty (" Java.Specification.Vender "); System.out.println (" "+PROPs .getProperty ("Java.Specification.name"); System.out.println ("Java's class format number:"+PROPS.GetProperty ("Java.class.Version"); tln (" Java's path: "+Props.getProperty (" Java.class.path "); System.out.println (" List of path search when loading library: "+Props.getProperty (" Java.library.Path ") );; "The default temporary file path:"+Props.getProperty ("Java.io.tmpdir"); System.out.println ("One or more extended directory path:"+Props .getProperty ("Java.ext.dirs"); System.out.println ("Name of the operating system:"+Props.Getproperty ("OS.Name"); : "+Props.GetProperty (" Os.arch "); System.out.println (" Version of the operating system: "+Props.getProperty (" os.version "); Character: "+Props.getProperty (" File.Separators "); // In the UNIX system," /"system.out.println (" Path separation: "+Props.Getproperty (" Path.Separators "))) ; // In the unix system, ":" System.out.println ("Lingle Segmental:+Props.getProperty (" Line.Separator "); // In the UNIX system,"/n "system.out .println ("User's account name:"+PROPS.GetProperty ("User.name"); System.out.println ("User's List:"+Props.getProperty); System .out.println ("User's current working directory:"+PROPS.GetProperty ("User.dir");}
I hope everyone can like it.