JFileChooser Slowness Bug

Yesterday I downloaded NetBeans IDE 5.5. I quickly noticed that was unusable. Not for Netbeans guilt, but for a problem with Swing and Windows XP. When I tried to open a file on netbeans, the ide got frozen. This made me crazy trying to find where the problem was…
The bug was not reproducible on my office pc that runs Windows 2000, and I started (again) thinking to retry a Linux migration.
It seems that the JFileChooser dialog has some conflict with the zipfolder feature: when instantiated it goes scanning files insize “zipfolders” on desktops or somewhere else.
If you notice this problem, just try this at command line prompt:

C:\\> regsvr32 /u %windir%\\system32\\zipfldr.dll

It worked for me. See bug #6372808.
I found this happening on jdk 1.5 and 1.6rc. Not good.


2 Responses to “JFileChooser Slowness Bug”  

  1. 1 Riccardo Pasquini

    still using winzoz? :P

    bye luigi, have fun…

  2. 2 Tres

    Good call.

    /*
    * Unregisters the zipfldr.dll fixes JDialog slowness
    * issues. (Should be made optional)
    */
    public static void applyFileChooserTweak() {

    String osName = System.getProperty("os.name").toLowerCase();
    if (!osName.contains("windows"))
    return;
    try {
    System.out.print("Unregistering zipfldr.dll to speed up program "
    "(don't worry, windows will reset this)...");
    Runtime.getRuntime().exec("regsvr32 /s %windir%/system32/zipfldr.dll");
    System.out.println("success");
    }
    catch (Exception e) {
    System.out.println("failed");
    }
    }

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



Calendar

December 2006
M T W T F S S
« Nov   Jan »
 123
45678910
11121314151617
18192021222324
25262728293031

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening