Using Properties
Anyone who has worked with Microsoft Windows for very long has encountered .ini files or the Registry. Both .ini files and the Registry contain configuration information. Similar information is often placed in a .login or .cshrc file in UNIX. Java also has a facility for storing application-specific information: a Properties object, which can be stored in a file if necessary. Many programs need configuration information, such as the appropriate directory to look in for a specific file, or the name of a host to use to find a database or the port to use for starting the JavaIDL orb. The Java way to deal with the need for such configuration values is to create a file using a Properties object, which consists of name/value pairs. ...
Get PURE Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.