I'm currently trying to pin a Java application to the Windows 7 taskbar. The application is launched with Launch4j. The program icon is displayed correctly but right-clicking the icon on the taskbar only shows a context-menu with the entry "Close window". No menu entry for pinning the application to the taskbar. Dragging the EXE file into the taskbar is also not working properly. When clicking this new launcher in the taskbar then a second icon spawns in the taskbar.
I followed the instructions of the solutions to these two questions to solve the problem but it didn't help:
The JNA stuff from the second question/solution compiles and doesn't throw any exception. I can read the app id after setting it. But I still can't pin the application to the taskbar.
I have created a small test application on Github which demonstrates the problem:
https://github.com/kayahr/launch4jtest
The application uses Maven as build system. Simply run mvn package
and you'll find a ZIP file in the target directory which contains the EXE file and the jna.jar which is needed to set this app id. Extract this ZIP to some directory, double-click the EXE and try to pin the application to the taskbar and you'll see the problem.
So what's wrong with this application?