简体   繁体   中英

How to get the file right click menu in windows explorer in Java

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 ?

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM