- // Execute a command without arguments
- final String command = chosenFile.getAbsolutePath();
-
- final String[] c = new String[1];
- c[0] = command;
-
- Runtime.getRuntime().exec(c);
- InstantLauncher.exitProgram();
- } catch (final IOException e) {
- new ExceptionDialog(e);
+ fileOpened = instantLauncher.openFile(chosenFile.getCanonicalFile());
+ if (fileOpened) {
+ InstantLauncher.exitProgram();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();