import java.util.Properties;
public class myProp
{
public static void main( String argv[] )
{
Properties myProps = System.getProperties();
myProps.list( System.out );
}
}
It gives me a quite long list. But I am wondering where do they come from?
Are they stored somewhere in a file and etc?
-- listing properties --
java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
sun.boot.library.path=C:\j2sdk1.4.1\jre\bin
java.vm.version=1.4.1-b21
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
user.country=US
sun.os.patch.level=Service Pack 2
java.vm.specification.name=Java Virtual Machine Specification
user.dir=D:\jwsdp-1.1\docs\tutorial\examples\j...
java.runtime.version=1.4.1-b21
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\j2sdk1.4.1\jre\lib\endorsed
os.arch=x86
java.io.tmpdir=D:\Profiles\xyzt\LOCALS~1\Temp\
line.separator=
java.vm.specification.vendor=Sun Microsystems Inc.
user.variant=
os.name=Windows 2000
sun.java2d.fontpath=
java.library.path=C:\j2sdk1.4.1\jre\bin;.;C:\WINNT\Syst...
java.specification.name=Java Platform API Specification
java.class.version=48.0
java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferenc
os.version=5.0
user.home=D:\Profiles\xyz
user.timezone=
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=Cp1252
java.specification.version=1.4
user.name=XYZ
java.class.path=./
java.vm.specification.version=1.0
sun.arch.data.model=32
java.home=C:\j2sdk1.4.1\jre
java.specification.vendor=Sun Microsystems Inc.
user.language=en
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode
java.version=1.4.1
java.ext.dirs=C:\j2sdk1.4.1\jre\lib\ext
sun.boot.class.path=C:\j2sdk1.4.1\jre\lib\endorsed\dom.ja...
java.vendor=Sun Microsystems Inc.
file.separator=\
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.cpu.isalist=pentium i486 i386
Usually not. They are set by the VM implementation, which obtains the
values in many ways (environment, OS system calls, etc.). A lot of
them are most likely even hard-coded in the VM code.
Very few of them can be changed on the command line when starting the
Java VM, via their own command line options. Using -D to change them is
usually not a good idea. Most of them are not meant to be changed.
/Thomas
>It gives me a quite long list. But I am wondering where do they come from?
>Are they stored somewhere in a file and etc?
They are not stored. They are generated by a native method.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/iraq.html for links about the Iraq war.