-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
5.0
-
x86
-
windows_98
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());
System.out.println("OK!");
}
}
-----------------------------
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
ibrary
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
ource)
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)
OK!
$
...
This is a JCK-conformance bug which affects JCK1.5-runtime interactive test
api/javax_swing/interactive/JFileChooserTests.html#JFileChooser.
Specific machine info:
======================
Hostname: linux-17
OS: Windows 98 SE
======================================================================
- duplicates
-
JDK-4895864 REG:any graphics app will get NPE on win98
-
- Resolved
-
- relates to
-
JDK-4858226 REGRESSION: User can not enter "C:\My Documents" directory using JFileChooser
-
- Closed
-
-
JDK-4922476 JFileChooser behaves incorrectly with "My Documents" on Windows 98
-
- Closed
-