Property File Syntax

Key aspects of Java property files:

The file contains a list of "keys" and "values".

Keys are character strings with no whitespace .

If the first non-whitespace character is # or ! a line is considered a comment and is ignored.

Keys and values may be specified as

  • key = value
  • key : value
  • key value

Whitespace before the value is ignored.

If no value is specified the key comprises of the empty string ("").

To use the character "\" in the value use the escape character "\" i.e. "\\" in a properties files translates to "\". Other characters of use are \n (new line charater) and \r (return character).

Complete information can be found at: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream)