0

Possible Duplicate:
Some taskbar pinned icons are duplicated when an instance of the application is running

Clicking on the Eclipse (Indigo) icon on my task bar makes a new icon instead of using the already pinned one. After clicking the already pinned icon on the task bar, it makes a new (and focused) one instead of using the existing. How can I make it use the initial pinned icon?

skypower
  • 1
  • 1
  • 2
  • Have you tried pinning that one and unpinning the old one? – digitxp Aug 26 '11 at 21:26
  • I tried it but after right clicking on the new one, there wasn't a "pin this program to taskbar" option. – skypower Aug 26 '11 at 21:30
  • Ok I finally found out the solution: http://aaron-kelley.net/blog/2010/11/cant-pin-eclipse-to-the-taskbar-in-windows-7/ – skypower Aug 28 '11 at 14:01
  • Could you please put that link as an answer to your own question? That way it'll be easier for other people to find it and this question can be marked as solved. – digitxp Aug 29 '11 at 16:37
  • Duplicate Question? http://superuser.com/q/214400/20433 – SgtOJ Aug 30 '11 at 17:32

2 Answers2

1

As jcrawfordor points out, it's because Java programs are launched by "Java For Windows". (javaw.exe)

I dug up a workaround -- adapted from here:

(I don't have Eclipse.exe currently installed, so I'm guessing Eclipse's file name in the examples, and haven't tested the this personally. :) )

  1. Browse to your Java directory in Program Files.
  2. Make a Copy of 'javaw.exe' file and rename it to the program's name (i.e.: Eclipse.exe).
  3. Create a new shortcut to the new file, plus a parameter (which will be your program's JAR file location) "C:\Program Files\Java\jre6\bin\Eclipse.exe" -Xmx512m -jar "[Eclipse's Path]\Eclipse.jar"
  4. Right-Click the icon, and from its properties choose "Change Icon" and choose your Eclipse's icon (to use instead of Java's icon).
  5. Right-Click your shortcut and choose Pin to Taskbar.

Now you should have your program's icon in the taskbar, and if you opened it, it won't duplicate.

Ƭᴇcʜιᴇ007
  • 111,883
  • 19
  • 201
  • 268
0

My understanding is that this happens when the program linked to by the icon launches a different process (the new process will get a new icon). You would need to instead create a pinned icon that launches the Eclipse executable itself with whatever settings necessary, rather than starting a "launcher program" that then starts Eclipse itself.

jcrawfordor
  • 16,219
  • 5
  • 39
  • 51
  • Yea I had the same problem with Netbeans (and still do I think), it starts a new process. I tried many ways to fix it but no luck. By the way, the right click menu says 2 things: New task and Activate task. Both give an error about java. – skypower Aug 26 '11 at 21:36
  • Yeah, this is a standard problem with things written in Java (NetBeans, Eclipse, heck, even Minecraft) because they typically consist of an .exe launcher which just starts a .jar with appropriate arguments to the JVM. – jcrawfordor Aug 26 '11 at 21:47
  • yea it said something about jvm, do you have any solution in mind? – skypower Aug 26 '11 at 22:09
  • Well, in many cases I think all the launcher is doing is running `java -jar `, but I don't know if that's really the case. If it is, it'd be easy to do this yourself. – jcrawfordor Aug 26 '11 at 22:44