code: public static void setLastPath( String lastPath ) {
          File file = new File(lastPath);
          if (!file.isDirectory()) {
              lastPath = file.getParentFile().getAbsolutePath();
          }
          Preferences preferences = Preferences.userRoot().node(GuiBridgeHandler.PREFS_NODE_NAME);
          preferences.put(LAST_PATH, lastPath);
      }
docs: Save the passed path as last path available.
  
  @param lastPath
  the last path to save.