public static File determineTargetUserDirectory(File wlpInstallDir) {
        File defaultUserDir = new File(wlpInstallDir, "usr");
        File serverEnvFile = new File(wlpInstallDir, "etc/server.env");
        if (serverEnvFile.exists()) {
            //server.env wins, so check it first
            Properties serverEnvProps = new Properties();
            FileInputStream serverEnvStream = null;
            try {
                serverEnvStream = new FileInputStream(serverEnvFile);
                serverEnvProps.load(serverEnvStream);
            } catch (Exception e) {
                //Do nothing at the moment, and fall back to default dir.
            } finally {
                SelfExtractUtils.tryToClose(serverEnvStream);
            }
            String customUserDir = serverEnvProps.getProperty("WLP_USER_DIR");
            if (customUserDir != null && !"".equals(customUserDir)) {
                return new File(customUserDir);
            }
        } else {
            //No server.env, environment variables take next precedence
            String envVarUserDir = System.getenv("WLP_USER_DIR");
            if (envVarUserDir != null && !"".equals(envVarUserDir)) {
                return new File(envVarUserDir);
            }
        }
        //No server.env setting, or environment variable, so take default
        return defaultUserDir;
    }
public static File determineTargetUserDirectory ( File wlpInstallDir ) { File defaultUserDir = new File ( wlpInstallDir , "usr" ) ; File serverEnvFile = new File ( wlpInstallDir , "etc/server.env" ) ; if ( serverEnvFile . exists ( ) ) { Properties serverEnvProps = new Properties ( ) ; FileInputStream serverEnvStream = null ; try { serverEnvStream = new FileInputStream ( serverEnvFile ) ; serverEnvProps . load ( serverEnvStream ) ; } catch ( Exception e ) { } finally { SelfExtractUtils . tryToClose ( serverEnvStream ) ; } String customUserDir = serverEnvProps . getProperty ( "WLP_USER_DIR" ) ; if ( customUserDir != null && ! "" . equals ( customUserDir ) ) { return new File ( customUserDir ) ; } } else { String envVarUserDir = System . getenv ( "WLP_USER_DIR" ) ; if ( envVarUserDir != null && ! "" . equals ( envVarUserDir ) ) { return new File ( envVarUserDir ) ; } } return defaultUserDir ; }
Get the user directory, defaulting to <installDir>/usr if WLP_USER_DIR is not set in server.env.

@param extractor
@return