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

Folder icon cannot be fetched from Windows on a headless system

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 21
    • 20
    • client-libs

      ADESCRIPTION OF THE PROBLEM:
      Folder Icons failed to load when JFileChooser instance is created on headless system. This issue is observed as part of JDK-8293862 and JDK-8227257 test. The issue seems intermittent as this was reproduced and found that the failure is observed for random folders for Image Icon loading.
      The following error is shown when an assertion is added for Image Icon load failure for testing purpose.

      ----------System.err:(27/1933)*----------
      java.lang.reflect.InvocationTargetException
              at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371)
              at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346)
              at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
              at bug8046391.main(bug8046391.java:52)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
              at java.base/java.lang.reflect.Method.invoke(Method.java:578)
              at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
              at java.base/java.lang.Thread.run(Thread.java:1591)
      Caused by: java.lang.AssertionError: C:\\Users\\mach5-one\\Downloads doesn't have icon(newIcon)
              at java.desktop/sun.awt.shell.Win32ShellFolder2.lambda$getIcon$0(Win32ShellFolder2.java:1178)
              at java.desktop/sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Win32ShellFolderManager2.java:626)
              at java.desktop/sun.awt.shell.ShellFolder.invoke(ShellFolder.java:532)
              at java.desktop/sun.awt.shell.ShellFolder.invoke(ShellFolder.java:518)
              at java.desktop/sun.awt.shell.Win32ShellFolder2.getIcon(Win32ShellFolder2.java:1138)
              at java.desktop/sun.awt.shell.Win32ShellFolder2$15.call(Win32ShellFolder2.java:1120)
              at java.desktop/sun.awt.shell.Win32ShellFolder2$15.call(Win32ShellFolder2.java:1059)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
              at java.desktop/sun.awt.shell.Win32ShellFolderManager2$ComInvoker$1.run(Win32ShellFolderManager2.java:595)

            tr Tejesh R
            tr Tejesh R
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: