title: Cross platform way to detect a symbolic link / junction point?
body: <p>In java, a symbolic link in a Unix environment can be detected by comparing the file's canonical and absolute path.  However, this trick does not work on windows. If I execute</p>
  
  <pre><code>mkdir c:\foo
  mklink /j c:\bar
  </code></pre>
  
  <p>from the command line and then execute the following lines in java</p>
  
  <pre><code>File f = new File("C:/bar");
  System.out.println(f.getAbsolutePath());
  System.out.println(f.getCanonicalPath());
  </code></pre>
  
  <p>the output is </p>
  
  <pre><code>C:\bar
  C:\bar
  </code></pre>
  
  <p>Is there any pre-Java 7 way of detecting a junction in windows?</p>