{@link com.tonbeller.tbutils.res.Resources} is the facade to access Resources. {@link com.tonbeller.tbutils.res.ResourcesFactory} contains a description how to configure the Resources.
{@link com.tonbeller.tbutils.res.ResourcesFactory} looks for a resource bundle named resfactory
in the classpath (root package).
The resfactory may contain the following entries:
tbeller.home |
Path of a directory in the filesystem where the application may want to store data or read property files.
The default is ~/.tonbeller
Example: Example: |
tbeller.usejndi |
defaults to true. If set to false, properties will not looked up via JNDI. Example:
tbeller.usejndi=false |
tbeller.bundles |
Names of ResourceBundle's that will be looked up in the class path
Example: |
tbeller.resources |
Paths of property files, that will be looked up in the file system. If the path is relative,
its releative to tbeller.home (see above), otherwise its taken absolute.
Example Example |
These four variables are looked up
user.properties
in root classpathtbeller.properties
property files in the given ordertbeller.bundles
Resource Bundles in the given orderroot.dir=/usr/local/myapp dir1=${root.dir}/dir1 dir2=${java.io.tmpdir}/dir2may expand to
root.dir=/usr/local/myapp dir1=/usr/local/myapp/dir1 dir2=/tmp/dir2