public static File getLastFile ( ) { Preferences preferences = Preferences . userRoot ( ) . node ( GuiBridgeHandler . PREFS_NODE_NAME ) ; String userHome = System . getProperty ( "user.home" ) ; String lastPath = preferences . get ( LAST_PATH , userHome ) ; File file = new File ( lastPath ) ; if ( ! file . exists ( ) ) { return new File ( userHome ) ; } return file ; }
Handle the last set path preference .