CodingBasics
CodingBasics

Reputation: 1

Two icons on taskbar when running java application

Hey so I have a Java application where I use a JFrame as the main window. My problem is when I pin the executable to the taskbar and then run the executable a second icon is placed on the taskbar instead of a "glow" being placed on top of the icon that is already pinned. In other words, two icons on the taskbar when I pin and run the executable. Is there any coding solution to this problem?

Please even let me know if you think there is no way or if you have come across this before.

Upvotes: 0

Views: 878

Answers (1)

Mike
Mike

Reputation: 1

There could be multiple reasons for this:

  1. Do you have more than one JFrame getting a task-bar icon? Referencing this question: how to restrict more than one java application icon on taskbar?

  2. It could be that the pinned version is not the same as the one that actually runs, i.e. trying pinning the second icon that appears, then using that icon in the future.

  3. You might need a setting in your configuration if you have any, Eclipse (the IDE) seems to suffer from this problem and requires the JVM tp be specified in it's ini file, referencing: How to make Eclipse behave well in the Windows 7 taskbar?

Last Resort. The IsHostApp setting in the registry can change the way java behaves on the task bar, you would still have two icons, they would just stack:
https://superuser.com/questions/465002/how-do-i-combine-multiple-java-buttons-into-a-pile-on-the-taskbar/465248#465248

Upvotes: 0

Related Questions