To access data that is within the TurbineResources.properties file,
all you need to do is this:
 |
 |
 |
 |
TurbineResources
.setPropertiesFileName("d:/path/to/TurbineResources.properties");
String foo = TurbineResources
.getString("foo.data","defaultValue");
|
 |
 |
 |
 |
The above code sets the properties file name path so that it can be found.
This only needs to be executed once per instance of the JVM because it
is a mostly static class and can cache this information. The getString()
line will retrieve the value out of the properties file that starts with
"foo.data". If that key value is not found in the properties file,
then it will return the optional "defaultValue" as the String.
There is also a class, TurbineResourceServices that allows you to use
the Services functionality to access information within TurbineResources.
Since this is more work for the programmer, I will leave this as an exercise
that you can do on your own. It is recommended that you just use the simple
example above instead.