public static File absoluteFile(File file){
  if (file != null) {
    try {
      file=file.getCanonicalFile();
    }
 catch (    IOException e) {
      file=file.getAbsoluteFile();
    }
  }
  return file;
}

public static File absoluteFile ( File file ) { if ( file != null ) { try { file = file . getCanonicalFile ( ) ; } catch ( IOException e ) { file = file . getAbsoluteFile ( ) ; } } return file ; }
turns the given file into the best absolute representation available
