帮忙看看,编译都通过,触发器也有效,但看不到执行效果: 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("D:"); Runtime.getRuntime().exec("cd D:\mulu"); Runtime.getRuntime().exec("shutdown.bat");//要执行的批处理文件,实现关闭的功能 return("0"); } catch (Exception e){ System.out.println("Error running command: \n" + e.getMessage()); return(e.getMessage()); } } } /create or replace procedure RunDx as language java name 'RunDx.Run()'; / set serveroutput on size 5000 call dbms_java.set_output(5000); exec RunDx ;
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("D:");
Runtime.getRuntime().exec("cd D:\mulu");
Runtime.getRuntime().exec("shutdown.bat");//要执行的批处理文件,实现关闭的功能
return("0");
}
catch (Exception e){
System.out.println("Error running command: \n" + e.getMessage());
return(e.getMessage());
}
}
}
/create or replace procedure RunDx
as language java
name 'RunDx.Run()';
/
set serveroutput on size 5000
call dbms_java.set_output(5000);
exec RunDx ;