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.
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.