public static File tryGetCanonicalFileElseGetAbsoluteFile(final File file){
  try {
    return file.getCanonicalFile();
  }
 catch (  IOException e) {
    return file.getAbsoluteFile();
  }
}

public static File tryGetCanonicalFileElseGetAbsoluteFile ( final File file ) { try { return file . getCanonicalFile ( ) ; } catch ( IOException e ) { return file . getAbsoluteFile ( ) ; } }
this method attempts to get the canonical form of the specified file otherwise returns it ' s absolute form . < p / >
