X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Finstantlauncher%2FInstantLauncher.java;h=8c844bac3eae9ff30f2a36a881f6cea63af4e8ae;hb=155895d0ed0f436753bf862287341830653a9c9f;hp=bb8681e33e22f67a1d8dbc58d71f8f9eb5157d8b;hpb=6f3b6383805ab24b835adaa7845e9306880ff7a3;p=instantlauncher.git diff --git a/src/main/java/eu/svjatoslav/instantlauncher/InstantLauncher.java b/src/main/java/eu/svjatoslav/instantlauncher/InstantLauncher.java index bb8681e..8c844ba 100755 --- a/src/main/java/eu/svjatoslav/instantlauncher/InstantLauncher.java +++ b/src/main/java/eu/svjatoslav/instantlauncher/InstantLauncher.java @@ -1,6 +1,13 @@ +/* + * Instantlauncher. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + package eu.svjatoslav.instantlauncher; -import eu.svjatoslav.commons.gui.dialog.ExceptionDialog; import eu.svjatoslav.instantlauncher.configuration.ConfigurationManager; import eu.svjatoslav.instantlauncher.configuration.FileAssociation; @@ -40,16 +47,11 @@ public class InstantLauncher { } public void openDirectory(File chosenFile) { - executeCommand(configurationManager.getConfiguration().directoryOpenCommand, chosenFile.getAbsolutePath()); + runOpeningApplication(configurationManager.getConfiguration().directoryOpenCommand, chosenFile); } - public void executeCommand(String... c) { - try { - Runtime.getRuntime().exec(c); - exitProgram(); - - } catch (final IOException e) { - new ExceptionDialog(e); - } + public void openDirectoryInTerminal(File chosenFile) { + runOpeningApplication(configurationManager.getConfiguration().directoryTerminalOpenCommand, chosenFile); } + }