阅读:2507回复:1
[分享]Java执行exe文件代码
<P>import java.sql.*;<BR>import java.io.*;<BR>import java.util.*;<BR>import javax.servlet.*;<BR>import javax.servlet.http.*;</P>
<P>public class test {<BR> </P> <P> public static void main(String[] args) { <BR> String path = "d:\\GenerateSql.exe";<BR> try {<BR> Runtime.getRuntime().exec("cmd /c start " + path);<BR> } catch (IOException e) {<BR> e.printStackTrace();<BR> } <BR> }<BR>}</P> |
|