Help! 'new JFileChooser();' takes 30 seconds to finishe!

M

metfan

I've jdk 1.4.2_03 installed and the hardware is Celeron 800M + 512M SDRAM

this is the code I excuted:

import java.util.Date;
import javax.swing.JFileChooser;

public class SimpleTest {
public static void main(String[] args) {
System.out.println(new Date());
JFileChooser jf = new JFileChooser();
System.out.println(new Date());
}
}

and the result on my machine is

Sun May 30 22:51:59 GMT+08:00 2004
Sun May 30 22:52:27 GMT+08:00 2004

It takes about 30 seconds to finish creating a JFileChooser.
Yes my machine is not that fast but I don't think it should
take 30 seconds to just create a JFileChooser. When I'm excuting
the code, there's no other program running, so the CPU is almost
100% free. And I used the 'Windows Task Manager' to watch the
'java' thread, and at the first few seconds of the code excution,
the CPU usage goes to 100%, and then the following 20 seconds, the
CPU usage became < 5%, it seems that the 'new JFileChooser' is
waiting for something? I don't know.

What happened? Any idea? thank.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top