I have an application that gets started via a shortcut. This application than starts a Java GUI application with CreateProcess().
When the Java application gets pinned to the taskbar the javaw.exe gets pinned to the taskbar instead of the "expected" shortcut. Only the native executable which launches Java can be modified - the shortcut has to stay.
What has to be done so that the shortcut gets pinned?
Thanks, Stefan
Use something like winrun4j or create a .bat instead of using a shortcut.
There is a Java library providing the new Windows 7 features for Java. It's called J7Goodies by Strix Code. Applications using it can be properly pinned to the Windows 7 taskbar. You can also create your own jump lists, etc.
You could clean your IconCache
like this:
First go to Task Manager and kill explorer.exe
Windows Task Management -> Processes -> End "explorer.exe"
Then, in the Task Management
Windows Task Management -> File -> New -> CMD.EXE
In the opened console type:
CD /d %userprofile%\AppData\Local DEL IconCache.db /a EXIT
Then reopen the explorer.exe
Windows Task Management -> File -> New -> explorer.exe
来源:https://stackoverflow.com/questions/1254430/wrong-app-gets-pinned-to-taskbar-windows-7