Trying to set the progress bar in the taskbar for the application.

ITaskbarList3 list = null; try { list = COMRuntime.newInstance(ITaskbarList3.class); } catch (ClassNotFoundException e) { e.printStackTrace(); } 

but the error takes off

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Unexpected COM error code: -2147417850 at org.bridj.cpp.com.COMRuntime.error (COMRuntime.java:197) at org.bridj.cpp.com.COMRuntime $ 1.initialValue (COMRuntime.java:231) at java.lang.ThreadLocal.setInitialValue (ThreadLocal.java:180) at java.lang.ThreadLocal.get (ThreadLocal.java:170) at org.bridj.cpp.com.COMRuntime .initialize (COMRuntime.java:254) at org.bridj.cpp.com.COMRuntime.newInstance (COMRuntime.java:262) at org.bridj.cpp.com.COMRuntime.newInstance (COMRuntime.java:258)

  • But what about JavaFx, if the problem is in Unexpected COM error code? - Andrew Bystrov
  • Googling this problem did not lead to anything. I would have a clue which way to dig - Andrey
  • one
    Try calling list = COMRuntime.newInstance(ITaskbarList3.class); in a separate thread list = COMRuntime.newInstance(ITaskbarList3.class); - JFX doesn’t like it when something in the UI is called in its thread. See the topic of bindings (bindings) - bindings and property - properties in JavaFX. - DimXenon
  • Thanks, helped! - Andrey

0