问题
I am making a twin panel commander.
I made two JTables which displays the current directory contents. I would like to implement that a right click on a file would display the windows explorer shell context menu.
Is it somehow possible ?
回答1:
Figured that out with using external app Runmenu.
String runMenuApp = "path\\to\\runmenu.exe /show ";
String file = "\"" + "path\\to\\fileordir" + "\"";
Process p = Runtime.getRuntime().exec(runMenuApp + file);
来源:https://stackoverflow.com/questions/9546626/how-to-get-the-file-right-click-menu-in-windows-explorer-in-java