How hard can it be?
The taskbar is all new and shiney in Windows 7 but it appears that it’s really hard for these newfangled collections of open-and-closed programs to just allow a shortcut. Ubuntu has Unity and one of the first things I came across was that I couldn’t keep some programs in the ‘taskbar’on the left (I don’t really know how Ubuntu calls it) . Same goes for Eclipse in Windows it seems. I’m using a 64 bit version of both Windows and Eclipse. Eclipse version is 4.1.1
It’s a bug!
After some google-fu I found this ‘double entry in the taskbar’ bug. The bug is not the same (“Eclipse icon is duplicated in taskbar”), but it seems the problem has the same cause and we can actually use one of the tricks down in the comments! Winz. My guess is the origional bug starts when you upgrade your Eclipse and allready have an Icon: then you have an icon you use to start eclipse, which makes a second non-pinable entry in the taskbar. To get from there to ‘my’ problem: just remove the first pin :)
Getting the “pin to taskbar” to show
From this comment by ‘riccardo’ we can figure out that an extra line or 2 is needed in the eclipse.ini file. Adding the location of the VM should fix all your sores.
- If you haven’t: remove any old pinned eclipse icons.
- Find your eclipse directory, and the eclipse.ini file.
- Add the following 2 lines:
- Run, and wait for the main screen to show (so not the splash or the workspace chooser)
- Right click, choose pin, have a drink.
These are the complete contents of my current eclipse.ini file:
-vm C:\Program Files\Java\jre7\bin -startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502 -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Xms40m -Xmx384m
After starting eclipse the first lines were automagically changed to this, but I don’t really think that matters :)
-vm C:/Program Files/Java/jre7/bin
Things can go wrong. You can read the comments of the linked bug above, but some common problems are:
- Not giving the ‘-vm’ and ‘path’ lines a separate line.
- Unstable behavior of Eclipse. Haven’t gotten that, but if you do, you can remove the ‘-vm’ line after pining.
- If you update your JRE, you might need to update the path too in your ini, I’m not really sure.
- Some people need a full reboot for any of this to work. (I didn’t by the way)
And while windows 8 is a whole new beast, it can’t hurt to add this tip in the comments by “VinnyJames”:
If you move the icon after pinning and before exiting eclipse it may not stick (this happens to me on Windows 8.1).
vm in ini, start, wait, pin, move pinned icon, exit = fail
vm in ini, start, wait, pin, exit, move pinned icon = success