Friday, June 20, 2014

ColdFusion Builder 2 and Two Icons in the Taskbar on Windows 7 x64

I installed ColdFusion Builder 2 as a plug-in on my work PC running Windows 7 x64 and Indigo 3.7.1. When I manually created a shortcut on my taskbar to run eclipse, I noticed something odd... a second icon would appear in the task bar for eclipse when the IDE would finish loading.

If you right click the second icon, there is no option to pin it to the taskbar. The biggest nuisance about this is that when you click the first taskbar shortcut, it starts another instance of Eclipse instead of bringing the running instance into focus.
The Solution:
To trick Eclipse/CFB2 into using a single icon, you have to point it to the /bin folder in the JRE.
Here is how:

Find the path to the JVM used by Eclipse?
using Click [Help]-->[About Eclipse]. Click the [Installation Details] button. In the Eclipse Installation Details window, click the [Configuration] tab.

Scroll down a bit until you see "java.home=..." (In my case, it was pointing to "C:\Program Files\Java\jre7".)

Edit eclipse.ini and use -vm to point Eclipse to the \bin folder
The configuration file eclipse.ini should be in the same folder as eclipse.exe. Add the following two lines to the top of the eclipse.ini file to help it find the /bin folder:
-vm{the path to java.home you discovered above plus /bin}
The next time you run Eclipse, right click the task bar icon and pin it.
You should be down to one icon that behaves more like a Windows app should.