Search notes:

Oracle: DBMS_JAVA.SET_OUTPUT

dbms_java.set_output redirects outputof Java procedures/triggers to dbms_output.
create or replace and compile java source named tq84_src as
public class tq84_cls {
   public static void write(String msg) {
       System.out.println (msg);
   }
}
/

alter java source tq84_src compile;
 
create or replace procedure tq84_write(msg varchar2) as
   language java
   name 'tq84_cls.write(java.lang.String)';
/
The following procedure executes ok, but nothing is (visibly) printed:
begin
   tq84_write('hello world');
end;
/
Enabling output and trying again:
begin
   dbms_java.set_output(10000);
end;
/

begin
   tq84_write('hello world');
end;
/
If still nothing is visible, perhaps serveroutput (SQL*Plus) needs to be enabled, too:
set serveroutput on

begin
   tq84_write('hello world');
end;
/
Cleaning up:
drop procedure tq84_write;
drop java source tq84_src;

See also

dbms_java

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/developm...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759561870, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/installed/packages/dbms/java/api/set_output(85): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51