Deploying Configuration Files in JAR Files
This section provides a procedure and an example for deploying configuration files in JAR files.
- Jar the files.
- Set the VMware GemFire® system properties to point to the files as they reside in the jar file.
- Include the jar file in your
- Verify the jar file copies are the only ones visible to the application at runtime. VMware GemFire searches the
CLASSPATHafter searching other locations, so the files cannot be available in the other search areas.
- Start your application. The configuration file is loaded from the jar file.
Example of Deploying a Configuration JAR
The following example deploys the cache configuration file,
my.jar. The following displays the contents of
% jar -tf my.jar META-INF META-INF/MANIFEST.MF myConfig/ myConfig/myCache.xml
In this example, you would perform the following steps to deploy the configuration jar file:
- Set the system property
- Set your
- Verify there is no file already in the filesystem named
./myConfig/myCache.xml, so VMware GemFire will be forced to search the jar file to find it.
When you start your application, the configuration file is loaded from the jar file.