public static File resolveAbsolutePath(String root,String path){
  File file=new File(normalizeFileName(path));
  if (!file.isAbsolute()) {
    String rootPath=normalizeFileName(root);
    if (!rootPath.endsWith("/")) {
      rootPath=rootPath.concat("/");
    }
    file=new File(rootPath + path);
  }
  return file;
}

public static File resolveAbsolutePath ( String root , String path ) { File file = new File ( normalizeFileName ( path ) ) ; if ( ! file . isAbsolute ( ) ) { String rootPath = normalizeFileName ( root ) ; if ( ! rootPath . endsWith ( "/" ) ) { rootPath = rootPath . concat ( "/" ) ; } file = new File ( rootPath + path ) ; } return file ; }
adds root directory to path if path is relative , or returns path if absolute
