Managing Your Configuration with JFig
After writing the necessary configuration files and including JFig code for accessing configuration info in an application code, the only thing that remains is to execute JFig itself. This is done by using the following command line:
java -Dconfig.filename=config_file [-Dconfig.location=classpath class_name]
java -Dconfig.filename= entServer.config.xml -Dconfig.location=classpath com.EA.StartApp
Here, config_file will be the absolute path to a desired configuration file, and the fully qualified name of the class initializing JFig, if no JFigLocator exists. But, if a user-defined or even default implementation of JFigLocator exists, simply specifying the fully qualified classname will do.
JFig is a powerful yet lightweight and easy-to-use configuration tool that combines the OOP concepts of reusability and inheritance with a configuration mechanism. JFig allows developers to maintain more than one configuration for their applications, while providing a single common repository to save all these configurations and organize them in a neat heirachy.
JFig makes modifying a configuration on the fly and reflecting changes in running application possible. It also integrates easily with existing applications and can retain previous configuration settings of non-JFig configuration mechanisms.
According to Mr. Bruce Conrad, creator of JFig, new and improved versions of JFig are also under development presently. These versions will be based on the Preferences API of J2SE 1.4.2 and will include more features.
Mugdha Chauhan (formerly Mugdha Vairagade) is a senior IT consultant and author. An Open Source supporter, she frequently writes articles and tutorials on useful emerging Open Source projects. Major tech portals, including developer.com, IBM developerWorks, CNET Networks, Slashdot, and many eZines regularly publish her work. Her expertise and interests include Java, Linux, XML, wireless application development, and Open Source.
Page 3 of 3