You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
929 B
36 lines
929 B
/********************************************************************************************************* |
|
* 프로그램명 : MString.java 프로그램설명 : 프로젝트와 관련된 정보를 얻을수 있는 class 작성자 : 강원중 작성일 : 2004.01.06 변경일 : 2003.11.30 |
|
**********************************************************************************************************/ |
|
|
|
package kr.co.kihyun.lang; |
|
|
|
public class Execute { |
|
String fileName; |
|
|
|
public Execute() { |
|
} |
|
|
|
public Execute(String fileName) { |
|
this.fileName = fileName; |
|
} |
|
|
|
public void setExecute(String fileName) { |
|
this.fileName = fileName; |
|
} |
|
|
|
public boolean execute() throws Exception { |
|
boolean result = false; |
|
Runtime cmd = Runtime.getRuntime(); |
|
String execCMD = fileName; |
|
Process proc = cmd.exec(execCMD); |
|
int x1 = proc.waitFor(); |
|
|
|
if (x1 == 0) { |
|
result = true; |
|
} else { |
|
result = false; |
|
} |
|
|
|
return result; |
|
} |
|
}
|
|
|