Matching Java applications
Java applications are extremely difficult for Docky to match. Some you might be able to edit your launchers and customize the window matching but this does not work for every Java program.
Another option is to download a custom java agent and have your Java program use that.
After you download and compile the agent (use 'ant' to compile it), you will need to modify the script that starts your Java program.
If the script was named '/usr/bin/foo' and did something like this:
java -args -args -args org.something.blah.foo
you just need to add this argument:
So the command now becomes:
java -javaagent:agent.jar=foo -args -args -args org.something.blah.foo
What does this do? The agent will set the WM_CLASS to be 'foo' (whatever string you set after the = sign). Now docky will use 'foo' and attempt to match it against any executable with that name, which happens to be the name of the script. Thus, Docky properly matches it!