X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Finstantlauncher%2FInstantLauncher.java;h=02fc7a42c9dace5be8bc16d849407ce7df2af5df;hb=d84757dc1d3555a22d9411970a6fa7efccf2619e;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..02fc7a4 100755 --- a/src/main/java/eu/svjatoslav/instantlauncher/InstantLauncher.java +++ b/src/main/java/eu/svjatoslav/instantlauncher/InstantLauncher.java @@ -1,6 +1,9 @@ +/* + * Instantlauncher. Author: Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * This project is released under Creative Commons Zero (CC0) license. + */ 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 +43,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); } + }