Java System Properties

Posted on Oct 29, 2008 (last modified Jun 1, 2021)

Following are a list of the standard system properties which can be accessed in Java code by using the System.getProperty methods. For example…

System.getProperty("path.separator");
Property NameDescriptionJava Version
file.encodingThe character encoding for the default locale1.1
file.encoding.pkgThe package that contains the converters that handle converting between local encodings and Unicode1.1
file.separatorThe platform-dependent file separator (e.g., “/” on UNIX, “\” for Windows)1.0
java.class.pathThe value of the CLASSPATH environment variable1.0
java.class.versionThe version of the Java API1.0
java.compilerThe just-in-time compiler to use, if any. The java interpreter provided with the JDK initializes this property from the environment variable JAVA_COMPILER.1.0
java.homeThe directory in which Java is installed1.0
java.io.tmpdirThe directory in which java should create temporary files1.2
java.versionThe version of the Java interpreter1.0
java.vendorA vendor-specific string1.0
java.vendor.urlA vendor URL1.0
line.separatorThe platform-dependent line separator (e.g., “\n” on UNIX, “\r\n” for Windows)1.0
os.nameThe name of the operating system1.0
os.archThe system architecture1.0
os.versionThe operating system version1.0
path.separatorThe platform-dependent path separator (e.g., “:” on UNIX, “,” for Windows)1.0
user.dirThe current working directory when the properties were initialized1.0
user.homeThe home directory of the current user1.0
user.languageThe two-letter language code of the default locale1.1
user.nameThe username of the current user1.0
user.regionThe two-letter country code of the default locale1.1
user.timezoneThe default time zone1.1