How do I grant execute permission to an Oracle database user?
The error message actually gives you the exact syntax

dbms_java.grant_permission( 'SCOTT', 
                            'SYS:java.io.FilePermission', 
                            '&lt;&lt;ALL FILES&gt;&gt;', 
                            'execute' )


It's not obvious to me whether you modified the text of the error message to remove a directory from the error-- normally, the error will tell you a specific directory that you need to grant access to.

If your intention is to allow the Java stored procedure to execute arbitrary shell scripts (this would be very dangerous-- the commands would run as the Oracle operating system user so they would have the ability to bypass any security measures in the database), you should be able to do something like

begin
  dbms_java.grant_permission
      ('SCOTT',
       'java.io.FilePermission',
       '&lt;&lt;ALL FILES&gt;&gt;',
       'execute');
  dbms_java.grant_permission
      ('SCOTT',
       'java.lang.RuntimePermission',
       '*',
       'writeFileDescriptor' );
end;