Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6518576

Graphic icons can NOT be displayed while Java Web Start launch an application with JDK 1.6

    XMLWordPrintable

Details

    • b66
    • 6
    • b13
    • x86
    • other
    • Verified

    Backports

      Description

        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.

        Attachments

          Issue Links

            Activity

              People

                ngthomas Thomas Ng (Inactive)
                xueyyan Xue-Yang Yan (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: