import java.lang.*;
import java.io.*;public class process {
public static void main(String args[]){
try
{
String command = "c:\\temp\\1.exe";
Process child = Runtime.getRuntime().exec(command);
}
catch(IOException e)
{
e.printStackTrace();
System.out.println("exe");
}
}
}
import java.io.*;public class process {
public static void main(String args[]){
try
{
String command = "c:\\temp\\1.exe";
Process child = Runtime.getRuntime().exec(command);
}
catch(IOException e)
{
e.printStackTrace();
System.out.println("exe");
}
}
}
解决方案 »
- 正则表达式表达字符串中出现‘张“或”涨“
- 关于相对路径的问题
- 如何使用java class的反射功能
- 求高手帮助call to super must be first statement in constructor!
- 请熟悉java的zip文件流的朋友帮个忙!!!!!!
- Jtable的行宽、中文转换、背景图
- 如何取得系统的所有盘符?
- 98下配置TOMCAT的问题(在线)
- WIN API 是否还值得学习
- 国内有申请证书(用以Applet代码签名)的机构吗?网址?
- 他妈的,我为什么会在这种初级问题上想不通?怎样才能将Object对象转化为实际的类型?高分有奖!
- 请问那位大侠有JPadPro的正式版及注册码
import java.util.*;public class CmdExec {
public CmdExec(String cmdline) {
try {
String line;
Process p = Runtime.getRuntime().exec(cmdline);
BufferedReader input = new BufferedReader
(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null) {
System.out.println(line);
}
input.close();
}
catch (Exception err) {
err.printStackTrace();
}
}public static void main(String argv[]) {
new CmdExec("c:/abc.bat");
}
}
访问http://168.168.18.11:81/etechbase/advsearch.php将您的问题输入查询内容框,选择不同的精确程度,即可以找到你所需要的答案。效果还是可以的。