Changed license to CC0
[instantlauncher.git] / src / main / java / eu / svjatoslav / instantlauncher / InstantLauncher.java
index bb8681e..02fc7a4 100755 (executable)
@@ -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);
     }
+
 }