simplified code
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Wed, 27 Aug 2014 08:44:04 +0000 (11:44 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Wed, 27 Aug 2014 08:44:04 +0000 (11:44 +0300)
src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java

index 7c323b3..a10dabe 100755 (executable)
@@ -113,12 +113,7 @@ public class MultiLevelMenu implements MenuListener {
        public void menuItemSelected(final Menu menu, final File chosenFile) {
                if (chosenFile.isFile())
                        if (chosenFile.canExecute())
-                               try {
-                                       Runtime.getRuntime().exec(chosenFile.getAbsolutePath());
-                                       InstantLauncher.exitProgram();
-                               } catch (final IOException e) {
-                                       new ExceptionDialog(e);
-                               }
+                               executeCommand(chosenFile.getAbsolutePath());
                        else {
                                final boolean fileOpened = FileAssociationManager.openFile(chosenFile);
                                if (fileOpened)