eclipse的 console如何输入windows的cmd命令
例如我输入pythonsetup.pyinstall,怎么直接在elipse的console里输入?...
例如我输入python setup.py install,怎么直接在elipse的console里输入?
展开
1个回答
2013-08-29
展开全部
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;public class Test {
public static void main(String [] args){
try {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String command="";
while((command=br.readLine())!=null){
Runtime.getRuntime().exec(command);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
import java.io.IOException;
import java.io.InputStreamReader;public class Test {
public static void main(String [] args){
try {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String command="";
while((command=br.readLine())!=null){
Runtime.getRuntime().exec(command);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询