public static void setHomePath(Path homeDir) {
        // Do a permission check on the new home directory
        if (!Files.exists(homeDir) || !Files.isDirectory(homeDir)) {
            Log.error("Error - the specified home directory does not exist or is not a directory (" + homeDir + ")");
        }
        else if (!Files.isReadable(homeDir) || !Files.isWritable(homeDir)) {
                Log.error("Error - the user running this application can not read " +
                        "and write to the specified home directory (" + homeDir + "). " +
                        "Please grant the executing user read and write permissions.");
        }
        else {
            home = homeDir.normalize().toAbsolutePath();
        }
    }
Sets the location of the <code>home</code> directory. The directory must exist and the
user running the application must have read and write permissions over the specified
directory.

@param homeDir the location of the home dir.
xmppserver/src/main/java/org/jivesoftware/util/JiveGlobals.java