java类中执行sqlplus脚本?
写成bat文件,改写成批处理脚本,使用java的Runtime 执行。举例如下: 此实例来自《Java核心技术》卷一 class ExecDemo { public static void main(String args[]){ Runtime r = Runtime.getRuntime(); Process p = null; try{ p = r.exec("notepad"); } catch (Exception e) { System.out.println("Error executing notepad."); } } }
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有