public static Properties createCommonSystemProperties ( ) throws EnvironmentException { // create a new system properties object Properties systemProperties = new Properties ( ) ; // host name, domain, fqdn String hostFQDN = getHostFQDN ( ) ; if ( ! StringUtil . isEmpty ( hostFQDN ) ) { // save the fqdn systemProperties . put ( HOST_FQDN , hostFQDN ) ; // split up the fqdn to find the host name and domain String [ ] hostInfo = splitHostFQDN ( hostFQDN ) ; // save the host name and domain, defaulting to an empty string if null systemProperties . put ( HOST_NAME , ( hostInfo [ 0 ] != null ? hostInfo [ 0 ] : "" ) ) ; systemProperties . put ( HOST_DOMAIN , ( hostInfo [ 1 ] != null ? hostInfo [ 1 ] : "" ) ) ; // add a new host name //systemProperties.put(HOST_NAME, hostname); } else { systemProperties . put ( HOST_FQDN , "" ) ; systemProperties . put ( HOST_NAME , "" ) ; systemProperties . put ( HOST_DOMAIN , "" ) ; } return systemProperties ; }
Creates a Properties object containing common system properties that are determined using various Java routines . For example determining the hostname that the application is running on .