Java Swing applications displayed with wrong name

Bug #751909 reported by Philip Weber on 2011-04-05
124
This bug affects 20 people
Affects Status Importance Assigned to Milestone
BAMF
Medium
Marco Trevisan (Treviño)
Unity
Fix Released
Medium
Marco Trevisan (Treviño)
bamf (Ubuntu)
Undecided
Marco Trevisan (Treviño)
openjdk-6 (Ubuntu)
Undecided
Unassigned
openjdk-7 (Ubuntu)
Undecided
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: unity

On launcher, all Java Swing applications are with wrong name. Their tooltip shows the Java class name, with the dots changed by hiphens.

For example, Netbeans icon itself gets inactive after startup.
Then an icon with a '?' shows up indicating "java-lang-Thread" on mouseover.

------------------------------------------------------------------------------------------

Treviño: this issue is java related (affecting javaws apps as well) and it's caused by the fact that the Java apps doesn't correctly set the WM_CLASS X property on their windows. There was a bug for it (including a patch): http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6528430
The ubuntu java package should probably include it.

A workaround to fix it is to use this window matching agent: https://github.com/jelmerk/window-matching-agent then you need to update the application
.desktop file to change the Exec value including -javaagent:agent.jar=<AppWMClass> and adding StartupWMClass=<AppWMClass>.

Related branches

Philip Weber (pw-itemp) wrote :
Philip Weber (pw-itemp) wrote :

used Netbeans 6.9.

Package: netbeans
Priority: optional
Section: universe/devel
Installed-Size: 2540
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Yulia Novozhilova <email address hidden>
Architecture: all
Version: 6.9-0ubuntu2
Replaces: netbeans-ide, netbeans5.5
Depends: libnb-platform12-java (>= 6.9), libnb-ide13-java (= 6.9-0ubuntu2), libnb-java4-java (= 6.9-0ubuntu2), libnb-apisupport2-java (= 6.9-0ubuntu2)
Conflicts: netbeans-ide, netbeans5.5
Filename: pool/universe/n/netbeans/netbeans_6.9-0ubuntu2_all.deb
Size: 1090162
MD5sum: 3d98bc837074c6d9ecbbce17a20b4d35
SHA1: f2aa83298f7031df9df0d1f1c73112463866bab0
SHA256: 0b618d2caee4aa7e5ffe2ca597b9d199ad3e9158a2e781a35369055941016c63
Description-de: Erweiterbare Integrierte Java-Entwicklungsumgebung (IDE)
 Integrated Development Environment for software developers. It supports
 development of desktop, enterprise, web, and mobile applications. Package
 includes the Base IDE, Java Development Tools and Plug-in Development
 Tools. Support for PHP, Ruby, C/C++, Java EE and others can be added.
Homepage: http://www.netbeans.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

This is happening with every Java Swing application (SWT is not affected by this).

I think this is a bug on bamf, not on unity.

summary: - Netbeans is displayed as java-lang-Thread in left sidebar.
+ Java applications displayed with wrong name
description: updated
affects: unity (Ubuntu) → bamf (Ubuntu)
Changed in bamf (Ubuntu):
status: New → Confirmed

just updated bamfdaemon to 0.2.82-0ubuntu1.

"?" icon is gone now. displays correct program icon.

Still showing new icon, named java-lang-Thread.

Program icon gets still inactive after program startup.

Didier Roche (didrocks) on 2011-04-07
Changed in unity:
status: New → Confirmed
Changed in bamf:
status: New → Confirmed
Ricardo Ferreira (ricardofcf) wrote :

I'm not sure that we are talking about the same bug, but I still see jDownloader with the "?" icon and named "jd-Main". I have bamfdaemon 0.2.84-0ubuntu2 installed.

@Ricardo: yes, it's the same bug.

confiq (confiq) wrote :

This bug should have bigger priority :S
Unity is not capable with any Java GUI program :(.

And I have a bug of different nature, when I drag-n-drop some mini-windows in netbeans, launcher stays on top and it's not in auto-hide mode... wandering to open new bug but it's Java related...

Changed in unity-2d:
status: New → Confirmed
summary: - Java applications displayed with wrong name
+ Java Swing applications displayed with wrong name
Changed in unity-2d:
importance: Undecided → High
MnCC (r0tmail) wrote :

same problem with mucommander : http://www.mucommander.com/
still getting the ?

Stefano Mtangoo (mtangoo) wrote :

Same problem with two icons for Netbeans 7.0.1
Is there any fix yet?

Dan Jared (danjaredg) wrote :

For netbeans with the two icons problem, you can use my plugin:

http://plugins.netbeans.org/plugin/40321/

description: updated
Changed in openjdk-6 (Ubuntu):
status: New → Confirmed
Changed in openjdk-7 (Ubuntu):
status: New → Confirmed
description: updated
Changed in bamf:
milestone: none → 0.4.0
no longer affects: bamf/0.2
no longer affects: bamf/0.3
Changed in bamf:
milestone: 0.4.0 → 0.5.0
Changed in bamf:
importance: Undecided → Medium
Changed in unity:
importance: Undecided → Low
no longer affects: unity-2d
Changed in bamf:
status: Confirmed → In Progress
Changed in unity:
status: Confirmed → In Progress
importance: Low → Medium
Changed in bamf:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
milestone: none → 7.1.0
Changed in bamf (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity at revision None, scheduled for release in unity, milestone 7.1.0

Changed in unity:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.0.1+13.10.20130702-0ubuntu1

---------------
unity (7.0.1+13.10.20130702-0ubuntu1) saucy; urgency=low

  [ Michal Hruby ]
  * A few changes to unity-core API/ABI.

  [ Ted Gould ]
  * Fix upstart job to handle legacy case and not duplicate events.

  [ Marco Trevisan (Treviño) ]
  * ApplicationManager: Use nux::ROProperty for Window and Application
    title and icon So BamfApplicationManager connect to {name,icon}-
    changed signals, set getters for properties and
    ApplicationLauncherIcon update icon tooltip_text and icon when App
    title/icon changes. (LP: #751909)
  * BamfApplicationManager: always use std::make_shared and use
    glib::SignalManager::Add Also add some helper constructors.
  * ApplicationLauncherIcon: only use a simple std::vector to cache the
    quicklist entries Remove the ugly std::string indexed std::map.
  * ConnectionManager: add a class container of sigc::connection that
    takes care of disconnection Connections added will be disconnected
    on class destruction on on explicit removal or replacement request.

  [ Lars Uebernickel ]
  * unity-panel-service: call ido_init() and honor indicator's position
    requests.

  [ Chris Townsend ]
  * Fixes some panel shadow regressions caused by rev. 3381. - No panel
    shadow when logging in, ie, no windows are opened. - Indicator drop
    down menus have the panel shadow painted over them. - Notification
    bubbles cause the panel shadow to be drawn on top of everything. -
    Minimizing all windows caused the panel shadow to not be drawn. (LP:
    #1194865)

  [ Didier Roche ]
  * now build-depends on the desktop definition for scopes as libunity-
    common is dead.

  [ Sebastien Bacher ]
  * use correct ellipses.

  [ Andrea Azzarone ]
  * Remove not necessary assert. (LP: #1192503)

  [ Łukasz 'sil2100' Zemczak ]
  * Revert revision 3380. This caused regression of all autopilot tests
    as show_desktop was invalidly detected every time there are no
    visible windows on screen.

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 3396
 -- Ubuntu daily release <email address hidden> Tue, 02 Jul 2013 05:32:40 +0000

Changed in unity (Ubuntu):
status: New → Fix Released
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:bamf at revision 564, scheduled for release in bamf, milestone 0.5.0

Changed in bamf:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bamf - 0.5.0+13.10.20130717-0ubuntu1

---------------
bamf (0.5.0+13.10.20130717-0ubuntu1) saucy; urgency=low

  [ Marco Trevisan (Treviño) ]
  * BamfApplication: keep track of the application main-window and
    update name and icon accordingly Applications without a .desktop
    file should update their name and icon based on their children. So
    now we try to compute the main window children, and we update name
    and icon based on it. (LP: #751909)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 564
 -- Ubuntu daily release <email address hidden> Wed, 17 Jul 2013 02:01:42 +0000

Changed in bamf (Ubuntu):
status: In Progress → Fix Released
Stephen M. Webb (bregma) wrote :

Fix Released in Unity Unity 7.1.0.

Changed in unity:
status: Fix Committed → Fix Released

Fix Released in Bamf BAMF 0.5.0.

Changed in bamf:
status: Fix Committed → Fix Released
Changed in openjdk-7 (Ubuntu):
status: Confirmed → Invalid
Changed in openjdk-6 (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers