For the past couple of weeks i’ve been putting up with a bug where my Docky shows two instances of Netbeans. The icon on the dock acts as a launcher which creates another Netbeans icon instead of using just the single icon and lighting up. The problem is due to Netbeans being a Java app and is also down to the way Docky handles window matching.
I did a bit of googling and found the cure at http://www.issathen.co.uk/?p=14.
To get Docky to work nicely with Netbeans 6.9.1, create a file, netbeans-6.9.1.desktop, and stick the following contents inside it:
1 2 3 4 5 6 7 8 9 10 11 12 13
Obviously adjust the paths so they match up with your Netbeans location. Alternatively, copy the Netbeans icon from your Ubuntu Applications -> Programming menu bar to your desktop and edit it.
Either way, once you’ve got the file with the crucial StartupWMClass=java-lang-Thread appended to the bottom, drag it onto your Docky and it should work correctly!