From: Svjatoslav Agejenko Date: Wed, 27 Aug 2014 08:44:04 +0000 (+0300) Subject: simplified code X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=0690182dc7ee52c470c27a393685e1845e69b73c;p=instantlauncher.git simplified code --- diff --git a/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java b/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java index 7c323b3..a10dabe 100755 --- a/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java +++ b/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java @@ -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)