JDK-5053844 : gif files not found error message displayed at console
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0,5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-05-27
  • Updated: 2005-08-17
  • Resolved: 2005-08-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_10Fixed 6 b48Fixed
Description
Name: dk106046			Date: 05/27/2004

FULL JDK VERSION(S):
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

and 

java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b48)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b48, mixed mode)


The error messages are seen when installing product using Installshield Multi-Platform
on platforms where the System look and Feel is Motif, this defect has been seen on AIX, Solaris, HP-UX.

The simple test case provided below sets the look and Feel to Motif so that the defect is seen on all platforms.

1. Run the test case supplied below
 java Test

2. The following error messages are displated at the console.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/FloppyDrive.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Computer.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/UpFolder.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/File.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HardDrive.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/DetailsView.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/NewFolder.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/ListView.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HomeFolder.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Directory.gif not found.

3. I would not expect these error messages to be displayed.

import java.util.*;
import javax.swing.*; 

public class Test { 
    public static void main (String args[]) throws Exception { 
        UIManager.setLookAndFeel ("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
        for (Enumeration e = UIManager.getDefaults().keys(); e.hasMoreElements(); ) {
            Object key = e.nextElement();
            UIManager.getDefaults().get(key);
        }
        System.exit (0);
    } 
}

======================================================================

Comments
EVALUATION When I mentioned moving the icons, I had actually meant moving where the properties are defined. That is, rather than defining them in Basic I wanted to define them in the Metal and Ocean subclasses. However, the nice thing about them being defined in Basic is that a subclasser can provide their own icons and automatically have them picked up. For that reason, leaving things as they are seems useful. Therefore, the fix to this is simple. We'll simply remove the error message :)
08-08-2005

WORK AROUND Name: dk106046 Date: 05/27/2004 Do not use the Motif Look and Feel. ======================================================================
25-09-2004

EVALUATION This is not an installer bug. Assigning to Swing to evaluate. ###@###.### 2004-05-27 Some values in the UIDefaults table are "lazy" values. They aren't constructed until an attempt is made to fetch them. These icons are one example of this. BasicLookAndFeel popuplates the table with these icons, but the actual image files aren't fetched until they are needed. MotifLookAndFeel never fetches these icons and therefore doesn't provide image files for them. It is a bug in client code if these values are being requested while under the Motif L&F. Closing as "Not a bug". ###@###.### 2004-05-28 Based on further discussion with the submitter, this bug is being re-opened. It seems there may be valid reasons for client code wanting to iterate through the UIDefaults values (such as to replace values of certain types). While this isn't the ideal thing to do for performance, since it causes lazy values to be initialized that may not be needed, it is legal. To fix this, we should move the icons from Basic to Metal and Windows where they are used. ###@###.### 2004-06-03
03-06-2004