class Java7Support {

    public static boolean isSymLink(File file) {
        try {
            Object path = toPath.invoke(file);
            Boolean result = (Boolean) isSymbolicLink.invoke(null, path);
            return result.booleanValue();
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }

}