Java File Links
Unfortunately dealing with links and permissions is not really easily possible in java. At least with the following code you can figure out whether you dealing with a link or not. A similar piece code has recently been contributed to the commons-io project. Found that really useful and worth sharing.
public static boolean isLink( final File file ) throws IOException {
if (file == null || !file.exists()) {
return false;
}
return !file.getCanonicalFile().equals(file.getAbsoluteFile());
}