Created
May 31, 2013 21:19
-
-
Save bchetty/5688091 to your computer and use it in GitHub Desktop.
Simple Java program to execute Mac-OS commands (For Ex: To open a Finder Window) through a Java program.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
/** | |
* Simple Java program to execute Mac-OS command (For Ex: To open a Finder Window) through a Java program. | |
* | |
* @author Babji, Chetty | |
*/ | |
public class Run { | |
public static void main(String[] params) throws IOException { | |
Runtime.getRuntime().exec(new String[] {"open", params[0]}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment