阅读:2672回复: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> |
|
1楼#
发布于:2007-04-05 21:22
<DIV glow(color=blue, strength=2); WIDTH: 255px"><FONT size=4><FONT color=red>只有共享,才有快乐</FONT></FONT></DIV>
<DIV glow(color=blue, strength=2); WIDTH: 255px"><FONT size=4>只有交流,才能提高。</FONT></DIV><BR> |
|