public static String resolveHomeDirectory ( String path ) { if ( path . startsWith ( "~" ) ) { return path . replace ( "~" , System . getProperty ( "user.home" ) ) ; } return path ; }
Method that changes any string starting with ~ to user . home property .