在PL/SQL中调用Java方法

Linux大全评论982 views阅读模式

1. 通过创建Java source的方式将Java class编译到数据库中

create or replace and compile java source named xxfnd as package xxfnd; public class Test{ public void Test(){ } pubic static String helloWorld(){ return "Hello, World!"; } }

2. 检查Java class是否编译成功

show errors java source xxfnd;

3. 创建PL/SQL测试程序包

create or replace package test_pkg is function hello_world return varchar2; end test_pkg; / create or replace package body test_pkg is function hello_world return varchar2 is language java name 'xxfnd.Test.helloWorld() return String'; end test_pkg; /

4. 编写plsq测试脚本

企鹅博客
  • 本文由 发表于 2020年9月22日 07:45:00
  • 转载请务必保留本文链接:https://www.qieseo.com/176468.html

发表评论