You need native code for this. I did it by writing a Windows C++ program that does the necessary taskbar setup stuff then invokes
Java via the Java Invocation Interface.
The right-click menu on the taskbar also requires native code. The native code can call into the already-running Java program, via Java Native Interface (JNI).
Google for examples.