How-to: Pin Eclipse to the Windows 7 taskbar

Before you begin, close any and all instances of Eclipse.

The Eclipse IDE for Java doesn’t come with an installer like most Windows packages do; it’s a zip file containing the program and the libraries it needs to run. As a result of this, and the fact that it’s written in Java, it has some non-standard behavior characteristics on its edges. One of them is the inability to pin the program to the taskbar like you can with most Windows programs. Another is the fact that when you tap the Windows key and type “eclipse”, eclipse.exe often doesn’t show up. (It might if you put it someplace besides %ProgramFiles% or %ProgramFiles(x86)%, I haven’t tested.)

No Eclipse in Windows search

I use the Windows 7 taskbar heavily, because I like being able to launch programs using Win+[number]. My desktop and laptop are configured identically, so Win+1 always opens Chrome, Win+5 is always iTunes. If you launch eclipse using Windows explorer, and then you try to “pin” the program to the taskbar, you discover that you can’t:

Can't pin Eclipse to taskbar

Well there’s a workaround. Buried in this bug report, you’ll discover that if you edit your environment variables, you’ll be able to pin eclipse to the taskbar. (You’ll need to be logged in as an Administrator):

Edit system environment variables

Edit Windows path variable Java

Add the path to the JRE to what’s currently there, followed by a semicolon. In my case, that would be:

C:\Program Files\Java\jre6\bin;

While you’re editing environment variables, it might not hurt to put in the path to the JDK, so if you ever decide to do Java development outside Eclipse, you don’t need to resort to setting the path by hand every time you launch the CLI. For me that’s “C:\Program Files\Java\jdk1.6.0_22\bin;” but it will change as newer versions of Java are released. If you do this, make sure you put the JDK path after the JRE path. For non-development purposes, you’ll generally want to be using the latest version of the JRE.

My new path looks like this:

C:\Program Files\Java\jre6\bin;C:\Program Files\Java\jdk1.6.0_22\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;[etc]

Click OK, and launch Eclipse from explorer as you normally would. You should now be able to pin Eclipse to the taskbar, giving it a home among the rest of your permanently docked programs. Doing it this way means you won’t see two icons when Eclipse is open, which is what happens if you drag eclipse.exe to the taskbar without editing the system path.

Pin Eclipse to Windows taskbar

Gives you:

Eclipsed docked in the taskbar

  • Cameron Jackson

    This didn’t work for me. Now right clicking the Eclipse icon just does nothing? Has anyone else had this happen?

  • Cameron Jackson

    Never mind, just tried it again and it worked! Looks like a restart might have been needed, though I can’t think why.

  • Viper400

    Did not work before of after restart

  • Viper400

    After further research I found that this method DOES work. They just forgot to say where to add the lines to the .ini add them to the beginning and not the end.

  • Akim 92

    Elegant solution! Also, for posterity sake, you could make a shortcut to Eclipse, then pin the shortcut to the taskbar.

  • Sven Kautlenbach

    if you right click the eclipse.exe you can choose to pin in to the taskbar!

  • Patrick Langlois

     But by doing so, you get a second icon on the taskbar when starting it.

  • samasha

    No , it doesn’t work with the new Juno eclipse :(

  • Daniele Bellavista

    Works on indigo, thanks!

  • Happy19born93

    drag the folder containing eclipse.exe to the start menu, hold it to the ‘All Programs’, then release when ‘move to program’ appears.

  • f1v3

    Thanks for the great post man!
    Just a quick note tho: With JUNO it works only if you add the JDK to the PATH as well.

  • Robin

    Thank you! This was driving me crazy.

  • Tuomas-Matti Soikkeli

    This makes a new icon when you launch Eclipse.

  • angel

    Didn’t work for me with eclipse Kepler.