谁知道java直接调用dos命令的方法? Runtime.getRuntime().exec("dos command"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 java.lang.Runtime.exec(java.lang.String) Runtime.exec("cmd.exe ? /c dir c: ") Runtime.getRuntime().exec("cmd.exe ? /c dir c: ") 楼上的兄弟:为什么这样没反应?public class RunDos { public static void main(String[] args) { try { Runtime.getRuntime().exec("cmd.exe ? /c dir c: "); } catch(Exception ioe) { ioe.printStackTrace(); } }} 呵呵, tryRuntime.getRuntime().exec("cmd /c start dir c: "); 出了个小错误找不出来 为什么出错? 刚看了IO,想到这样的情况应该怎么写? HashMap的存放的值能不能是一个hashTable? windows下的ldap服务端软件有那些? 请教,如何在一个类里写个定时执行的触发程序?谢谢 一个源码,出了三个错误,搞了好长时间搞不错了,帮忙看一下 毕业设计的最新要求,关于JAVA3D,答对就给分 请问何处下载JDK。 怎么把java.io.OutputStream outputStream写到一个String中去? 如何设置环境变量? 请问:如何设置MANIFEST.MF中的CLASSPATH?
public class RunDos {
public static void main(String[] args) {
try
{
Runtime.getRuntime().exec("cmd.exe ? /c dir c: ");
}
catch(Exception ioe)
{
ioe.printStackTrace();
}
}
}