JDK-4899750 : REGRESSION: It's impossible to create JFileChooser on Winows 98
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_98
  • CPU: x86
  • Submitted: 2003-08-01
  • Updated: 2003-08-05
  • Resolved: 2003-08-05
Related Reports
Duplicate :  
Relates :  
Relates :  

Name: iaR10016			Date: 08/01/2003

Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.5.0-b12, JDK1.5.0-b11
                  (not reproducible with JDK1.4.2-b28)
JCK            : JCK1.5-runtime (b02), JCK1.4a-runtime
Platform[s]    : Windows 98
switch/Mode    : default
JCK test owner : http://javaweb.eng/jck/usr/owners.jto

It is impossible to create JFileChooser object with JDK1.5.0-b12 on
Windows 98 because javax.swing.JFileChooser() constructor throws
unexpected java.lang.InternalError.

Please, note that this bug is not reproducible with previous JDKs
(JDK1.4.2, for example).

I am not able to reproduce the failure on other Windows systems.

Please, compile and run the following test example to reproduce the failure:
--------- test.java ---------
import javax.swing.*;
public class test {
  public static void main(String[] args) {
      (new JFileChooser()).showOpenDialog(new JFrame());

Sample output is:
$ java -showversion test
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b12)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b12, mixed mode)

Exception in thread "main" java.lang.InternalError: Could not initialize shell l
         at sun.awt.shell.Win32ShellFolder2.initIDs(Native Method)
         at sun.awt.shell.Win32ShellFolder2.<clinit>(Unknown Source)
         at sun.awt.shell.Win32ShellFolderManager2.getDesktop(Unknown Source)
         at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
         at sun.awt.shell.ShellFolder.get(Unknown Source)
         at javax.swing.filechooser.FileSystemView.getRoots(Unknown Source)
         at javax.swing.filechooser.WindowsFileSystemView.getHomeDirectory(Unknow
n Source)
         at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(Unknown S
         at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
         at javax.swing.plaf.metal.MetalFileChooserUI.installUI(Unknown Source)
         at javax.swing.JComponent.setUI(Unknown Source)
         at javax.swing.JFileChooser.updateUI(Unknown Source)
         at javax.swing.JFileChooser.setup(Unknown Source)
         at javax.swing.JFileChooser.<init>(Unknown Source)
         at javax.swing.JFileChooser.<init>(Unknown Source)
         at test.main(test.java:4)


$ h:/java/jdk1.4.2/win32/bin/java -showversion test
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)



This is a JCK-conformance bug which affects JCK1.5-runtime interactive test

Specific machine info:
Hostname: linux-17
OS: Windows 98 SE


EVALUATION The MSLU runtime DLL ("unicows.dll") cannot be loaded in this problem case, as it is located in jre/bin directory. Need to look for the DLL in the directory specified in the "sun.boot.library.path" system property. ###@###.### 2003-08-04 Closed as a duplicate of 4895864