public static String getPath ( String relativePath , String backupDirCanonicalPath ) throws MalformedURLException { String path = "file:" + backupDirCanonicalPath + "/" + relativePath ; URL urlPath = new URL ( resolveFileURL ( path ) ) ; return urlPath . getFile ( ) ; }
Will be returned absolute path .