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

2019-05-10 15:28发布

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

3条回答
beautiful°
2楼-- · 2019-05-10 16:07

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

查看更多
我想做一个坏孩纸
3楼-- · 2019-05-10 16:14

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

查看更多
Fickle 薄情
4楼-- · 2019-05-10 16:31

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.

查看更多
登录 后发表回答