execute exe program/application in java

www.lautt‮iru‬.com
execute exe program/application in java
/**
 * @author lautturi.com 
 * Java example:How to run other application in java
 */

import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;

public class Lautturi {

	public static void open(String targetFilePath) throws IOException {
		Desktop desktop = Desktop.getDesktop();
		desktop.open(new File(targetFilePath));
	}

	public static void main(String[] args) throws IOException {

		String path = "C:\\Users\\Administrator\\test.exe";
		open(path);

	}
}
Created Time:2017-09-23 13:51:17  Author:lautturi