system.out.println输出在oracle java类中的位置 [英] where does system.out.println output goes in oracle java class
本文介绍了system.out.println输出在oracle java类中的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用loadjava实用程序将一个java类加载到oracle中
I have loaded a java class into oracle using loadjava utility
这个类有一些system.out.println消息。
This class has some system.out.println messages.
当我从这个类执行一个方法时,我想看到sysout消息。
When I execute a method from this class I want to see the the sysout messages.
谁能告诉我在哪里可以找到这些消息?
Can anyone tell me where can I find these messages?
推荐答案
Oracle 文章提供了一些有用的信息。
An Oracle article provides some useful info.
引用:
你的班级:
public class SimpleJava {
public void main(String[] args) {
System.out.println("Here we are");
}
}
现在,编译并加载你的类:
Now, compile and load your class:
C:\oracle9i\bin>javac SimpleJava.java
C:\oracle9i\bin>loadjava -user scott/tiger SimpleJava.class
从SQL * Plus中,创建PL / SQL包装器以调用新的加载的Java类:
From SQL*Plus, create the PL/SQL wrapper to invoke the newly loaded Java class:
SQL> create or replace procedure call_simplejava
2 as language java
3 name 'SimpleJava.showMessage()';
4 /
执行SQL * Plus中的代码:
Execute the code from SQL*Plus:
SQL> set serveroutput on;
SQL> call dbms_java.set_output(50);
致电完成。
SQL> execute call_simplejava;
Here we are
这篇关于system.out.println输出在oracle java类中的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文