Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Loadjava from a client

Re: Loadjava from a client

From: Avi Abrami <aabrami_at_intersystemsww.com>
Date: Thu, 28 Nov 2002 13:20:11 +0200
Message-ID: <3DE5FBEB.215B7976@intersystemsww.com>


Simon Harvey wrote:
>
> Hi again,
>
> The code that I've loaded into the database is:
>
> public class HelloWorld {
>
> public static void hello(){
> System.out.println("Hello World");
> }
>
> }
>
> Maybe I'm being a bit silly here because Im actually not 100% sure that the
> source should print out to the screen. But thats what I was expecting. If I
> run it in sql++, what should it do? All im getting it PL/SQL procedure
> completed successfully!
>
> Doesnt seem to successfull at the moment!: (
>
> Simon

Hi Simon,
I get the impression, from your question, that you haven't thoroughly read the relevant Oracle documentation. Below is an excerpt which, I believe, answers your question. [Note: I didn't find any mention in your post of which version of Oracle you are using -- so I am assuming the latest version. In any case, documentation is also available for other versions as well.]



On the server, the default output device is a trace file, not the user screen. As a result, System.out and System.err print to the current trace files. To redirect output to the SQL*Plus text buffer, call the procedure set_output() in package DBMS_JAVA, as follows:

SQL> SET SERVEROUTPUT ON
SQL> CALL dbms_java.set_output(2000);

The minimum (and default) buffer size is 2,000 bytes; the maximum size is 1,000,000 bytes. In the following example, the buffer size is increased to 5,000 bytes:

SQL> SET SERVEROUTPUT ON SIZE 5000
SQL> CALL dbms_java.set_output(5000);

Output is printed when the stored procedure exits.

For more information about SQL*Plus, see the SQL*Plus User's Guide and Reference.


The above is copied from the following web page:

http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96659/04_call.htm#14774

And _all_ of the Oracle documentation is available from:

http://tahiti.oracle.com

Hope this helps you.

Good Luck,
Avi. Received on Thu Nov 28 2002 - 05:20:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US