a problem with java stored procedure to execute exp.exe
Hi ,
A simple Java stored procedure is working fine(e.g To print "Hello").
But when i use Runtime.exec() to run exp.exe,this is not working although i have granted all required
permissions. This procedure executes successfully But doesn't creates any LOG or DUMP files
The code is
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
import java.io.*;
import java.lang.Runtime;
public class Host {
public static void executeCommand() {
try {
Process p=Runtime.getRuntime().exec("exp.exe adm/adm@dbserver
owner=PR01 file=e:/temp/pr01.dmp log=e:/temp/pr04.log
compress=y grants=n STATISTICS=COMPUTE");
p.waitFor();
} catch(Exception e) {
System.out.println("Error:"+e.getMessage());
}
}
};
/
CREATE OR REPLACE PROCEDURE Host
AS LANGUAGE JAVA
NAME 'Host.executeCommand ()';
/
CALL DBMS_JAVA.SET_OUTPUT(1000000);
SET SERVEROUTPUT ON SIZE 1000000
exec Host();
Can anybody tell me the solution?
Thanks in advance...

