当前位置:我的异常网» Oracle开发 » oracle存储过程调用外部exe,该如何解决
oracle存储过程调用外部exe,该如何解决
www.myexceptions.net 网友分享于:2013-03-27 浏览:311次
oracle存储过程调用外部exe
想用存储过程调用一个外部exe,比方说c盘下的notepad.exe文件,参考了一些大虾的做法,如下:
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED RunDx AS
import java.io.*;
public class RunDx{
public static String Run(){
try{
System.out.println( "success ");
Runtime.getRuntime().exec( "C: ");
Runtime.getRuntime().exec( "notepad.exe ");
return( "0 ");
}
catch (Exception e){
System.out.println( "Error running command: " + e.getMessage());
return(e.getMessage());
文章评论