code: public static File getDataDirectory( String applicationname )
      {
          if( isUnix() )
          {
              String dirname = "/home/" + USERNAME + "." + applicationname.toLowerCase();
              File dir = new File( dirname );
              return dir;
          }
          if( isWindows() )
          {
              String name = toFirstCap( applicationname );
              String dirname = getEnvVariable( "APPDATA" ) + File.separator + name;
              File dir = new File( dirname );
              return dir;
          }
          String message = "Environment operations not supported on unrecognized operatings system";
          UnsupportedOperationException cause = new UnsupportedOperationException( message );
          throw new EnvironmentException( cause );
      }
docs: Returns the Data directory of the application for the logged in user.
  On Unix systems, the $HOME/.<i>applicationname</i> (all lower-case) directory will be returned.
  On Windows systems, $APPDATA/<i>applicationname</i> (with uppercase, first letter) will be returned.
  
  @param applicationname The name of the application.
  
  @return The directory where the application can store data.