分享更有价值
被信任是一种快乐

oracle12c中如何导入java的jar文件

文章页正文上

这篇文章主要介绍oracle12c中如何导入java的jar文件,文中介绍的非常免费主机域名详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完! 1、创建表空间
[oracle@host01 /]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 21 15:29:33 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> alter session set container=xfpdb;
SQL> create tablespace xftbs datafile ‘/u01/app/oracle/oradata/PRODCDB/xfpdb/xftbs01.dbf’ size 10m;
Tablespace created.
2、创建用户并授权
SQL> create user xf identified by xf default tablespace xftbs quota u免费主机域名nlimited on xftbs;
User created.

SQL> grant connect ,resource to xf;
Grant succeeded.

3、使用xf用户连接数据库执行jar包导入
需要将commons-math4-3.0.jar文件上传至/home/oracle/files/下
使用dbms_java.loadjava导入jar包
[oracle@host01 admin]$ sqlplus xf/xf@192.168.56.101:1521/xfpdb.example.com

SQL*Plus: Release 12.1.0.2.0 Production on Tue Dec 19 13:58:13 2017

Copyright (c) 1982, 2014, Oracle. All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> call dbms_java.loadjava(‘-v -r PUBLIC -sysnonym /home/oracle/files/commons-math4-3.0.jar’);

Call completed.

SQL> begin
dbms_java.loadjava(‘-v -r PUBLIC -sysnonym /home/oracle/files/commons-math4-3.0.jar’);
end;
/

PL/SQL procedure successfully completed.

SQL> exec dbms_java.loadjava(‘-v -r PUBLIC -sysnonym /home/oracle/files/commons-math4-3.0.jar’);

PL/SQL procedure successfully completed.

或者使用loadjava命令
[oracle@host01 admin]$ loadjava -force -thin -user xf/xf@192.168.56.101:1521/xfpdb.example.com -resolve /home/oracle/files/commons-math4-3.0.jar

4在Oracle数据库创建java代码

SQL> create or replace and compile java source named jar_norm as
2 import org.apache.commons.math4.distribution.NormalDistribution;
3 public class jar_norm {
4 public static double s_inv(double s){
5 NormalDistribution normalDistribution =new NormalDistribution(0,1);
6 double S1=normalDistribution.inverseCumulativeProbability(s);
7 return S1;
8 }
9 public static double s_dist_c(double s){
10 NormalDistribution normalDistribution =new NormalDistribution(0,1);
11 double S1=normalDistribution.cumulativeProbability(s);
12 return S1;
13 }
14 }
15 /
以上是“oracle12c中如何导入java的jar文件”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注云技术行业资讯频道!

相关推荐: EBS服务器管理有哪些

本篇内容主要讲解“EBS服务器管理有哪些”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“EBS服务器管理有哪些”吧!EBS服务的重启停止Oracle Applications 服务的顺序为:停止应用产品相关服务,再停…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册