JDK-4805690 : Application has wrong icon and title at windows taskbar
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-01-21
  • Updated: 2011-07-08
  • Resolved: 2011-07-08
Related Reports
Relates :  
Relates :  
Name: gm110360			Date: 01/21/2003

java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

Microsoft Windows XP [Version 5.1.2600]

If taskbar's property "Group similar taskbar buttons" is on
then there is a problem with application's icon and title.
The attached example demonstrates the problem. When an
application has many frames (enough to group them at
taskbar) then  application's icon is replaced with "default"
(small white window) icon. The title is also changed to "javaw".

I am reporting this bug against Windows version of JDK, but
the same problem exists under Linux (KDE 3.0.5). The only
difference is that under KDE the icon is default X icon and
title is "java.lang.Thread"

1. Be sure that "group similar taskbar buttons" property is on
2. Compile and run the attached example

1. Taskbar button which represents group of application
frames must have the application's icon ("streaming cap" in
our case).

2. Tile should not be "javaw". It should be "Test Frame"
because all application's frame has the same title.

This bug can be reproduced always.

---------- BEGIN SOURCE ----------

import javax.swing.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

 * @author Vladimir Kondratyev
public class Test {
  public static void main(String[] args){
    MyWindowListener windowListener=new MyWindowListener();
    JFrame frame=new JFrame("Test Frame");

    for(int i=0;i<10;i++){
      JFrame _frame=new JFrame("Test Frame");

  private static final class MyWindowListener extends WindowAdapter{
    public void windowClosing(WindowEvent e){

---------- END SOURCE ----------
(Review ID: 180177) 

EVALUATION With Java 6, the title of the grouped icon reads as "Java(TM) Platform SE binary" which is better than just "java" or "javaw". Since Windows doesn't provide any other API/possibility to control the icon/title of the grouped button, we're unable to fix anything else in Java. Therefore, I'm closing this CR as 'Will Not Fix'.

EVALUATION Name: vuR10080 Date: 01/22/2003 ###@###.### 2003-01-22 For KDE it seems (from my brief reading of their code) that KDE picks-up the icon of the last frame to be the icon of the collapsed group button. As for the name - since all the frames belong to one application, KDE will use the client leader name. AWT creates an unmapped client leader window so that all application frames can have a single client leader. AWT sets the name of the leader to the name of the class at the bottom of the stack trace seen by the MToolkit constructor, as we don't have a public API to set the "Application Name" and class name seems like a good semi-meaningful choice. ====================================================================== Name: ssR10077 Date: 01/23/2003 On WinXP application doesn't have direct control over Group naming and Icon. These prams get from module resources. The group Title corresponds to VERSIONINFO\"FileDescription" string. The icon corresponds to the first icon resource. If module has no resurces the module name is used as title and default file type icon as icon. The title is also cached per session in registry key HKEY_USERS\...\Software\Microsoft\Windows\ShellNoRoam\MUICache so even replacing it in the module doesn't change title. Looks like the best possible result can be acheaved by adding icons and FileDescription to all JDK executables. ====================================================================== Currenty Microsoft provides no API allowing conrtol Taskbar icon grouping. Problem is partially fixed with WinXP SP2. See: http://support.microsoft.com/default.aspx?scid=kb;en-us;818110 ###@###.### 2005-06-20 15:50:42 GMT

WORK AROUND To workaround the problem in Windows XP: Edit the following registry entry if it already exists, or create a new one. 1) Resolve the icon issue: [HKEY_CLASSES_ROOT\Application\java.exe] "TaskbarGroupIcon" [REG_EXPAND_SZ] = "C:\Program Files\Java\j2re1.4.2_XX\javaws\JavaCup.ico" [HKEY_CLASSES_ROOT\Application\javaw.exe] "TaskbarGroupIcon" [REG_EXPAND_SZ] = "C:\Program Files\Java\j2re1.4.2_XX\javaws\JavaCup.ico" 2) Resolve the caption issue: [HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache] "C:\Program Files\Java\j2re1.4.2_XX\bin\java.exe" [REG_SZ] = "Java(TM) 2 Platform Standard Edition binary" "C:\Program Files\Java\j2re1.4.2_XX\bin\javaw.exe" [REG_SZ] = "Java(TM) 2 Platform Standard Edition binary" Note: Do not use double qoute for the left hand side of the VALUE=DATA pair. Use double qoute for the right hand side of the VALUE=DATA pair if applicable (ie. path with embeded space). Substitute the correct and full path to the installed JRE binaries refered in the registry. Both the issues are not supported or documented by Microsoft. ###@###.### 2005-2-15 07:46:59 GMT