package com.wiki.standalone.moxkiriya.util;

import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;

public class DefaultProgramExecutor {
	public static void execute(String path) {
		Desktop desktop = Desktop.getDesktop();

		try {
			desktop.open(new File(path));
		} catch(Exception e) {
			try {
				desktop.browse(new java.net.URI("file://" + path));
			} catch (IOException e1) {
				e1.printStackTrace();
			} catch (URISyntaxException e1) {
				e1.printStackTrace();
			}
		}
	}
}
