Reputation: 1268
I want to open the folder bestellingen
with windows explorer. the folder is in the root directory of my project.
so far I have this:
Runtime rs = Runtime.getRuntime();
try {
Process p = rs.exec("./bestellingen/");
} catch (IOException exc) {
exc.printStackTrace();
}
But if I run the project the error says "acces denied"
Upvotes: 0
Views: 118
Reputation: 159784
Directories can't be executed but you could do
File dir = new File("...");
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().open(dir);
}
Upvotes: 2