Process exec(String[] cmdarray)
Executes the specified command and arguments in a separate process. 这是从jdk里找到的用法,输入参数的
Executes the specified command and arguments in a separate process. 这是从jdk里找到的用法,输入参数的
解决方案 »
- manifest.mf
- JfreeChart鼠标事件的问题
- 找兼职(大连java)
- SQL Server访问权限问题,高手们帮我看看,谢谢了!
- 问个很菜的问题
- 怎样才能写一个程序,开启后,实现10分钟不动电脑,就自动关闭.
- swing的JTable,某一列可以设定CellEditor为combox,但是我想每个combox的可选项都不同,怎么办?
- 求教:String与StringBuffer的区别。
- 画了2周写了一个俄罗斯方块Applet(1300),欢迎到 go2play.126.com 下载和试玩,请多提宝贵意见.
- 窗体拖动问题!!
- javamail问题,如果哪位老大帮忙解决了,一定酬谢!!
- 请推荐一本英文版的JAVA基础教程
BufferedReader line = new BufferedReader(new InputStreamReader(in));
String l = line.readLine();
while (l!=null)
{
System.out.println(l);
l = line.readLine();
}
in.close();
{DefaultMutableTreeNode node=(DefaultMutableTreeNode)tree.getLastSelectedPathComponent() ;
String str=node.toString() ;
if(node.isLeaf())
{try
{File f=new File(node.getParent() .toString().trim() +str.trim()+".txt");
FileWriter tofile=new FileWriter("gxy.bat");
BufferedWriter out =new BufferedWriter(tofile);
String temp1="del "+f.getAbsoluteFile() .toString() ;//del f:\my_bag\JBuiler6.0\Swing_study\5月 7日.txt
out.write(temp1,0,temp1.length() );
out.flush() ;
tofile.close() ;out.close() ;
}
catch (IOException e1){}
}
del();
}
} void del()
{try
{Runtime ce=Runtime.getRuntime() ;
ce.exec("gxy.bat") ;
}
catch (IOException e1){}
}
这是部分程序,
看看对你是否有帮助。