Sun Device Detection Tool(Compiled by jdk1.4.2) is an Java Web Start applicantion developed by HCTS team. We tested the it with JRE1.4.2 and JRE1.5, and it works well. When we tested it with JRE1.6, the graphic icons on the GUI disappeared often time (not every time). In other words, all image icon on the GUI including the button which contains a image icon disappeared. This problem raised on all of S10, SNV55, Fedora Core 5, and Windows XP platforms. Averagely starting it 10 ~ 15 times, the problem will occur once. For a few systems, it might raise more often. When we disabled the option of "Keep temporary files on my computer" in Java Control Panel -> Temporary Internet Files Settings, this problem didn't occur again even running more than 50 times. It seems a *Work Around* of this problem. All source code and icons pictures (a few JPG and GIF files) are complied into a single jar file. In the source code, there are a few icons added into the GUI with the following code: ---------------------- ImageIcon icon1 = new ImageIcon(this.class.getResource("icons/pic1.jpg")); ImageIcon icon2 = new ImageIcon(this.class.getResource("icons/pic2.jpg")); ... ... ImageIcon starticon = new ImageIcon(this.class.getResource("icons/StartButton.jpg")); this.StartButton = new JButton(starticon); ... ... ---------------------- We also tried using ClassLoader instance to replace this.class.getResource as follows: ---------------------- ClassLoader cl = this.getClass().getClassLoader(); ImageIcon icon1 = new ImageIcon(cl.getResource("icons/pic1.jpg")); ... ... ---------------------- However, the problem raised as well.
|