Error com4j.ComException: 80004005 .\invoke.cpp:51 while getting open windows and selected items
问题 I need to get all selected files and folders in Windows Explorer. I'm using com4j to access win Shell32 API (thanks to Tom91136, refer this if you need to learn how can you install and initialize com4j) . This code class gets the selected files or folders in Windows Explorer and prints. import java.io.File; import com4j.*; import test.wsh.*; import java.util.*; import java.util.Timer; import javax.swing.*; public class DetectSelection { public static void main(String[] argv) { list(); //there