process error

Hi all,:wink:
i need to exexute OS commands from oracle prompt.
For that i did the following steps
1) created a java source called "Host".
2)created a pl/sql procedure called'Host_Command '.
3)issued the following statements
EXEC dbms_java.grant_permission( 'TMS','SYS:java.io.FilePermission', '/bin/sh', 'execute' )

EXEC Dbms_Java.Grant_Permission('TMS', 'SYS:java.lang.RuntimePermission','writeFileDescriptor', '');

EXEC Dbms_Java.Grant_Permission('TMS', 'SYS:java.lang.RuntimePermission','readFileDescriptor', '');

Finally i executed the folllowing statements.
SET SERVEROUTPUT ON SIZE 1000000
CALL DBMS_JAVA.SET_OUTPUT(1000000);
BEGIN
Host_Command ('ls');
END;
/
But i ma getting the following process error;
Process err :/bin/sh: ls: No such file or directory

PL/SQL procedure successfully completed.

Any idea pls.

cheers
RRK

What does the Host java code do exactly?

Try fully qualified path for "ls", eg "/usr/bin/ls" or whatever.

Do you mean the SqlPlus shell?
if so you can execute OS commands with '!'.

for example:
SQL> !ls -l