Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("explorer /select,c:\\sampleFile.txt");
You can open a file (if the Desktop api is supported) on any platform with java.awt.Desktop.getDesktop().open(file)
. Is there something similar to bring up a file manager?
Thanks.
What happens if you call getDesktop().open(file.getParentFile()) ?
精彩评论