“Wrong” app gets pinned to taskbar (Windows 7)

2019-05-10 15:58发布

问题:

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

回答1:

Use something like winrun4j or create a .bat instead of using a shortcut.



回答2:

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.



回答3:

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