All Downloads are FREE. Search and download functionalities are using the official Maven repository.

holmos.webtest.autoit.AsynchronousExecute Maven / Gradle / Ivy

There is a newer version: 1.0.2u10
Show newest version
package holmos.webtest.autoit;

import java.io.IOException;

/**
 * 异步执行autoIt命令
 * 
 * @author 吴银龙([email protected])
 * */
public class AsynchronousExecute extends Thread{
	private boolean succeed;
	private String cmd;
	public AsynchronousExecute(String cmd){
		this.cmd=cmd;
		this.succeed=false;
	}
	@Override
	public void run(){
		try {
			Runtime.getRuntime().exec(cmd).waitFor();
			this.succeed=true;
		} catch (IOException e) {
			e.printStackTrace();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	public boolean isSucceed() {
		return succeed;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy