Java tutorial
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.IOException; public class Main { /** * A 'checked exception free' version of {@link File#getCanonicalFile()}. */ public static File canonicalFile(File file) { try { return file.getCanonicalFile(); } catch (final IOException e) { throw new RuntimeException(e); } } }