Added license and copyright notice.
[instantlauncher.git] / src / main / java / eu / svjatoslav / instantlauncher / InstantLauncher.java
index bb8681e..8c844ba 100755 (executable)
@@ -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);
     }
+
 }