Same problem with JabRef, and I cannot seem to find a resolution.
Is there not a webpage somewhere the explains, in detail, how BAMF does it's matching?
For JabRef, xprop reports:
morse@s3 launchers> sleep 2; xprop | grep WM_CLASS
WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "net-sf-jabref-JabRefMain"
I have tried setting StartupWMClass to these two values, as well as "java-lang-Thread" in my jabref.desktop file. Nothing works, I always get a duplicate icon showing up in Unity's launcher.
For completeness, the present contents of my jabref.desktop file are:
Exec=java -jar /opt/jabref/JabRef.jar
Comment=Jabref Reference Manager