37

This question is very similar to its famed windows 7 counterpart, but the same solution no longer works on windows 10 so it seems like the new platform is worthy of its own question.

Of course, everybody who uses eclipse on windows has hit this age old bug at one point of another - documented here - but for those who aren't familiar, the TL;DR is that you get two taskbar icons for eclipse because the eclipse launcher (eclipse.exe) and the eclipse workspace (JVM) are two separate processes and you can't pin the workspace process. It looks like they wont fix this in the near term so we're reliant on workarounds for now.

Has anybody gotten eclipse to work with Windows 10 taskbar? What about start menu search (a.k.a. cortana). The post here walks through start menu pinning but windows search doesn't pick up the shortcut, unfortunately

Community
  • 1
  • 1
icyitscold
  • 1,051
  • 1
  • 9
  • 19
  • 2
    The fix here is really something the eclipse team should be handling: Both parts of eclipse should be [using the same AppUserModelId](http://blogs.msdn.com/b/oldnewthing/archive/2015/08/10/10634022.aspx) and that way, windows will treat them as logically the same object. That said, it does seem like some workarounds for apps got dropped in the move to win10, because I noticed that this started happening for things like iTunes (and iTunes released an update to fix it on their end, iirc) – Andrew Pilley Sep 23 '15 at 17:50
  • Thanks for the info - I'll relay it to the eclipse community in bugzilla – icyitscold Sep 23 '15 at 18:43

6 Answers6

45

This is an updated version of icyitscold's answer that doesn't require uninstalling/reinstalling eclipse.

1) Unpin any eclipse icons

2) Run "eclipse.exe -clean" to clear the cache and then close eclipse

3) Modify ./plugins/org.eclipse.epp.package.xxxxx/plugin.xml
The folder varies based on which version of eclipse you are using: j2ee, java, c++ etc.
Change the appName property - call it "MyEclipse" or something.

4) Edit the eclipse.ini to add:

-vm
C:/Program Files/Java/jdk1.8.0/jre/bin/server/jvm.dll

Or wherever your JDK is before the line:

--launcher.appendVmargs

5) Run eclipse and open a workspace, pin the eclipse icon after it's loaded.


Credit to icyitscold, Ruslan Gainutdinov, Timo Kinnunen

Shannon Smith
  • 451
  • 1
  • 4
  • 3
  • 1
    This worked perfectly. Actually for me step 2 and 4 wasn't necessary. – Climax Jan 16 '17 at 08:25
  • @Shannon-Smith Sadly this didn't work for me. I do "MyEclipse" in my title now, which I find oddly amusing, but when eclipse is fully up and running, (with no pinned) and I pin to Taskbar, a second icon is created. If I start a second instance, that icon is only active while splash screen is open. Once spash has finished and a new eclipse window opens, it stacks with the other eclipse window. The ide window icon has an "unpin" option, it unpins the splash icon. – WORMSS Feb 01 '17 at 11:55
  • 3
    Steps 1 and 2 were enough for me on Windows 8.1. After I started Eclipse with -clean option I got the "Pin to taskbar" option on running eclipse window. – cakan Feb 17 '17 at 07:20
  • 1
    Thanks, Cakan. Your solution (using only steps 1 and 2) also works on Windows 10. – dionoid Apr 23 '17 at 13:08
  • 1
    For me, just positions 1 and 5 were sufficient on a windows 2016 machine – datafiddler Sep 19 '17 at 12:07
  • And for me, only Step 4 was required. I like this one as I often tweak `eclipse.ini` anyway to set JVM memory & GC options. Worked on Win 7 & 10, Java 7 through 9. (Tested with the "Eclipse SDK" product, if that matters.) – Luke Usherwood Mar 30 '18 at 10:18
  • For me, I had to replace the default `-vm .../bin/javaw.exe` with `-vm .../bin/server/jvm.dll` and I could pin Eclipse onto the taskbar. Thanks! – Igor Jan 15 '20 at 20:35
24

Fix for Eclipse Neon + Oxygen + Photon + 2019‑06

This was pretty simple 2 step process, no editing required.

  1. Close all Eclipse instances and unpin the non-working icon

  2. Open up Eclipse. DO NOT PIN yet. Select a workspace, let the main Eclipse window load. Pin that (right click on the icon -> Pin to taskbar).

That worked perfectly for me.

Community
  • 1
  • 1
Charles Goodwin
  • 6,019
  • 2
  • 31
  • 61
18

The answer was staring me in the face all along - at least for the taskbar. Full credit to Timo Kinnunen who had already posted this workaround in the in the bugzilla report

1) Edit the plugin.xml file of your selected Eclipse version ("product") and erase the following line:

<property name="appName" value="Eclipse"/> 

This should be done before starting the installation for the first time, because the property value gets cached and the change won't have effect before the cache is cleared. The correct file to edit varies:

  • \plugins\org.eclipse.sdk_4.4.0.v20140123-1600
  • \plugins\org.eclipse.epp.package.standard_2.1.0.20131103-0830
  • \plugins\org.eclipse.epp.package.jee_4.5.0.20150621-1200

2) Edit eclipse.ini to add these lines at the end before the line --launcher.appendVmargs, add this:

-vm
C:/Program Files/Java/jdk1.8.0/jre/bin/server/jvm.dll

This causes the JVM to be launched in the same process as eclipse.exe rather than as a child process and avoids the intricacies of Host Processes with AppUserModelIDs.

3) Launch Eclipse by double-clicking eclipse.exe. Only once the workspace is open select "Pin this program to taskbar" from the taskbar icon.

icyitscold
  • 1,051
  • 1
  • 9
  • 19
  • 2
    `This should be done before starting the installation for the first time` What do those of us who have already run Mars do, other than uninstall and reinstall from scratch? – Martin Nov 20 '15 at 17:16
  • 1
    To clarify terms used in the answer and above comment, "install" means extracting the zip contents to the directory you want and "uninstall" means to delete the directory from your hard drive completely. I could not get the instructions to work until I deleted the eclipse directory, started fresh by unzipping to the same location, then followed the directions. – codenaugh Jan 20 '16 at 21:01
  • 2
    Simply closing Eclipse and unpinning the taskbar shortcut(s), followed by your step 3 worked for me. Thanks. – brandall Jan 29 '16 at 03:40
  • Simply removing the property from `plugin.xml` and re-adding the shortcut worked for me on Windows 10 - I didn't have to reinstall Eclipse or edit `eclipse.ini` – Zout Sep 21 '16 at 16:38
  • Simply added the -vm option (with the path for the jvm) and unpinning/starting/pinning worked (had to do it twice I guess though). – Nuno Aniceto Dec 07 '16 at 19:31
  • 2
    I also was able to get it to work with just the `-vm` argument in `eclipse.ini` - crucial point is the `jvm.dll` path must be on a separate line! – robert Dec 21 '16 at 11:13
  • I couldn't find the plugin.xml file. But adding the vm arg worked for me. – ABC123 Apr 20 '17 at 14:43
1

For windows 10, go to extracted eclipse folder, right click on eclipse.exe and

  • To pin to taskbar, select Pin to taskbar
  • To pin to Start menu, select Pin to Start
Jobayer Ahmmed
  • 1,486
  • 1
  • 12
  • 18
0

This was way easier than I expected..here's what I did in Win 10.

  1. Went to unzipped Eclipse folder and right clicked on the Eclipse Icon and 'created shortcut by using Send to Desktop.
  2. Once the shortcut appeared on my Desktop,,right clicked the icon and chose 'Pin to Taskbar'

Done!....simple..no?

  • This does not work unless you have the -vm specified in the eclipse.ini file, tested on fresh install of Eclipse Neon.1 – Andy Braham Nov 13 '16 at 15:37
0

The steps described in this post worked for me, to get rid of the duplicated item in the taskbar (Windows 10 + eclipse Oxygen):

https://superuser.com/a/932807

Andreas Schneider
  • 2,595
  • 3
  • 16
  • 18