Open files and folders

 

1. Invoke the default open program or folder of the file extension

java.awt.Desktop.getDesktop().open(new File(path));

 2. Call the system CMD command

Runtime.getRuntime().exec("\""+path+"\"");

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326046930&siteId=291194637