Package moa.core

Class PropertiesReader


  • public final class PropertiesReader
    extends Object
    Class implementing some properties reader utility methods.
    Version:
    $Revision: 6681 $
    Author:
    Eibe Frank, Yong Wang, Len Trigg, Julien Prados
    • Constructor Detail

      • PropertiesReader

        public PropertiesReader()
    • Method Detail

      • readProperties

        public static Properties readProperties​(String resourceName)
                                         throws Exception
        Reads properties that inherit from three locations. Properties are first defined in the system resource location (i.e. in the CLASSPATH). These default properties must exist. Properties defined in the users home directory (optional) override default settings. Properties defined in the current directory (optional) override all these settings.
        Parameters:
        resourceName - the location of the resource that should be loaded. e.g.: "weka/core/Utils.props". (The use of hardcoded forward slashes here is OK - see jdk1.1/docs/guide/misc/resources.html) This routine will also look for the file (in this case) "Utils.props" in the users home directory and the current directory.
        Returns:
        the Properties
        Throws:
        Exception - if no default properties are defined, or if an error occurs reading the properties files.