The steps:
- Go to your eclipse installation directory, right click eclipse.exe and click "Create shortcut"
- Open Eclipse by double-clicking the newly created shortcut.
- Go past the workspace selection and the splash screen. Once Eclipse is fully loaded, right-click the Eclipse icon in the taskbar, and click "Pin this program to taskbar".
- Close Eclipse.
- Delete the shortcut.
The results:
- No duplicate Eclipse taskbar entries, which is a known issue in the latest Eclipse releases
- Context menu of Eclipse's taskbar entry works (I noticed this is a new issue in Eclipe Luna)
You have to make sure that Eclipse will run in a good JVM, too. You can therefore modify your PATH system variable to include the path to the JVM of your choice, or modify the eclipse.ini file in the same directory as eclipse.exe, and add the following 2 lines:
-vm
C:/Program Files/Java/[your Java VM]/bin
If you choose the PATH solution, you append to your PATH variable this piece of text:
;C:/Program Files/Java/[your Java VM]/bin
Ensure yourself that Eclipse is running in the JVM you chose, by opening Windows Task Manager and inspecting the command line used to run Eclipse. On my system, I noticed that some javaw.exe located in C:\Windows\System32\ was used, which was not what I wanted.