// Execute a command without arguments
final String directoryPath = chosenFile.getAbsolutePath();
- final String[] c = new String[2];
+ final String[] c = new String[3];
c[0] = "nautilus";
- c[1] = directoryPath;
+ c[1] = "-w";
+ c[2] = directoryPath;
try {
Runtime.getRuntime().exec(c);