-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Apache OfBiz Cookbook
Java properties files are a native Java mechanism for maintaining a set of persistent values, called "properties", across invocations of the JVM. They are typically files that are persistent to the local file system.
Properties files consist of one or more key/value pairs, very much like a Java Map structure.
The following code snippet demonstrates finding the value for the CommonDatabaseProblem key from the CommonUiLabels Java property file:
import org.ofbiz.base.util.UtilProperties;
errMsg = UtilProperties.getMessage("CommonUiLabels",
"CommonDatabaseProblem", messageMap, locale);
OFBiz makes using Java properties files convenient and easy by loading them as resources on the Java CLASSPATH and providing several utility methods to access file contents.
Change the font size
Change margin width
Change background colour