Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include jar files to a Java Stored Procedure in Oracle?

I'm realizing a stored procedure and need now the ability to include jar files to my stored procedure, which do not belong to the standard deployment of the JRE. How can I do this? As I know wasn't it possible with Oracle 9 ...

Thanks for help!

like image 669
Florian Müller Avatar asked Feb 07 '12 08:02

Florian Müller


2 Answers

Use the loadjava tool, it accepts jar files, too: http://docs.oracle.com/cd/B19306_01/java.102/b14187/cheleven.htm#CACFHDJE

See also this related question (copied the above link from there): Setting classpath for a Java stored procedure in Oracle

like image 170
Martin Klinke Avatar answered Sep 17 '22 23:09

Martin Klinke


I normally use this console command to add new jars to oracle:

exec dbms_java.loadjava('D:\temp\jcifs-1.3.19.jar');

In my case I added this library to connecto to windows shared folders from a oracle linux installation (smb). After the installation you may need to grant your user with permissions.

like image 25
PbxMan Avatar answered Sep 17 '22 23:09

PbxMan