base/common/src/main/com/thesett/common/properties/PropertyReaderBase.java
protected void findProperties()
    {
        /*log.fine("findProperties: called");*/

        // Try to load the properties from a file referenced by the system property matching
        // the properties file name.
        properties = getPropertiesUsingSystemProperty();

        if (properties != null)
        {
            /*log.fine("loaded properties using the system property");*/

            // The properties were succesfully located and loaded
            return;
        }

        /*log.fine("failed to get properties from the system properties");*/

        // Try to load the properties from a resource on the classpath using the current
        // class loader
        properties = getPropertiesUsingClasspath();

        if (properties != null)
        {
            /*log.fine("loaded properties from the class path");*/

            // The properties were succesfully located and loaded
            return;
        }

        /*log.fine("failed to get properties from the classpath");*/

        // Try to load the properties from a file relative to the current working directory
        properties = getPropertiesUsingCWD();

        if (properties != null)
        {
            /*log.fine("loaded properties from the current working directory");*/

            // The properties were succesfully located and loaded
            return;
        }

        /*log.fine("failed to get properties from the current working directory");*/
    }
protected void findProperties()
    {
        /*log.fine("findProperties: called");*/

        // Try to load the properties from a file referenced by the system property matching
        // the properties file name.
        properties = getPropertiesUsingSystemProperty();

        if (properties != null)
        {
            /*log.fine("loaded properties using the system property");*/

            // The properties were succesfully located and loaded
            return;
        }

        /*log.fine("failed to get properties from the system properties");*/

        // Try to load the properties from a resource on the classpath using the current
        // class loader
        properties = getPropertiesUsingClasspath();

        if (properties != null)
        {
            /*log.fine("loaded properties from the class path");*/

            // The properties were succesfully located and loaded
            return;
        }

        /*log.fine("failed to get properties from the classpath");*/

        // Try to load the properties from a file relative to the current working directory
        properties = getPropertiesUsingCWD();

        if (properties != null)
        {
            /*log.fine("loaded properties from the current working directory");*/

            // The properties were succesfully located and loaded
            return;
        }

        /*log.fine("failed to get properties from the current working directory");*/
    }
protected void findProperties ( ) { /*log.fine("findProperties: called");*/ // Try to load the properties from a file referenced by the system property matching // the properties file name. properties = getPropertiesUsingSystemProperty ( ) ; if ( properties != null ) { /*log.fine("loaded properties using the system property");*/ // The properties were succesfully located and loaded return ; } /*log.fine("failed to get properties from the system properties");*/ // Try to load the properties from a resource on the classpath using the current // class loader properties = getPropertiesUsingClasspath ( ) ; if ( properties != null ) { /*log.fine("loaded properties from the class path");*/ // The properties were succesfully located and loaded return ; } /*log.fine("failed to get properties from the classpath");*/ // Try to load the properties from a file relative to the current working directory properties = getPropertiesUsingCWD ( ) ; if ( properties != null ) { /*log.fine("loaded properties from the current working directory");*/ // The properties were succesfully located and loaded return ; } /*log.fine("failed to get properties from the current working directory");*/ }
This methods attempts to load the properties from a file or URL referenced by the system property with the same
name as the properties resource name, from a resource on the classpath with the same name as the properties
resource name or from a properties file name relative to the current working directory. It tries these methods
sequentially one after the other until one succeeds.
This methods attempts to load the properties from a file or URL referenced by the system property with the same name as the properties resource name from a resource on the classpath with the same name as the properties resource name or from a properties file name relative to the current working directory . It tries these methods sequentially one after the other until one succeeds .