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...

[1108 byte] By [ddmadasnala] at [2007-11-26 21:17:01]
# 1
check out this link http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
arunmp25a at 2007-7-10 2:55:40 > top of Java-index,Java Essentials,Java Programming...