title: Windows shortcut to a symbolic link to an executable
body: <p>I'm going to use an issue I'm having with a Java application to explain my question by way of an example, but this question has nothing really to do with Java.</p>
  
  <p>I'm using Windows 7 (64-bit) and I want to create a Start Menu shortcut to execute a GUI Java application. As of Java 8, the installer puts NTFS symbolic links in a well-known place pointing to a release-specific (i.e. subject to frequent change) directory:</p>
  
  <pre><code>C:\&gt;where javaw
  C:\ProgramData\Oracle\Java\javapath\javaw.exe
  
  C:\&gt;dir C:\ProgramData\Oracle\Java\javapath\javaw.exe
   Volume in drive C is OS
   Volume Serial Number is D4DC-33AF
  
   Directory of C:\ProgramData\Oracle\Java\javapath
  
  05/03/2015  15:40    &lt;SYMLINK&gt;      javaw.exe [C:\Program Files\Java\jre1.8.0_40\bin\javaw.exe]
  </code></pre>
  
  <p>I created a shortcut whose target command line was C:\ProgramData\Oracle\Java\javapath\javaw.exe <em>java_app.jar</em> but when I run it, Windows says the javaw.exe path does not exist. I can successfully run the same command line from the Windows Run dialog; just not from a shortcut. Can anyone offer a solution? (I prefer not to create a batch file to run the command, as that would create a useless console box.)</p>
  
  <p>(NB You can also see the same issue without using Java. Just create a symbolic link to Notepad.exe (using the MKLINK command) and then try to create a shortcut to the symbolic link.)</p>