JAVA中调用.bat文件
try {String command = "notepad";
Process child = Runtime.getRuntime().exec(command);
} catch (Exception e) {
e.printStackTrace();
}
如c:/my.bat
可以通过语句
Process comm=Runtime.getRunTime().exec("cmd /c my.bat");
调用指定的.bat文件
另外,如何在JSP页面中提供表单,供用户填写Oracle数据库的
driver,url,username,password
然后,提交后执行逻辑备份操作;
逻辑备份的代码为:
ms-dos:
exp system/oracle@myoracle inctype=complete file='c:\db.dmp
' log='c:\exp.log'
上面也即是.bat文件的主要内容;
具体的JSP代码待实现中...,不知思路可否?
页:
[1]