7

I've got an Oracle 10g database, and I have a third-party jar file. I want to be able to run a SQL select query in my database that ultimately runs code in my third-party library to retrieve info for inclusion in a SQL result set. I see lots of tutorials on "Java stored procedures" and these seem to be a promising way to do this, but none seem to use third-party libraries, and I can't seem to figure out how to specify a classpath for my jar file that will be recognized when I am running in Oracle. How can I do this?

Andy Mikula
  • 16,796
  • 4
  • 32
  • 39
Chris Farmer
  • 24,974
  • 34
  • 121
  • 164

2 Answers2

12

You can load the JAR file into the database using the loadjava tool. This tool accepts also .class, .java, .properties, .sqlj, .ser, .jar, or .zip files.

See the manual ( http://docs.oracle.com/cd/B19306_01/java.102/b14187/cheleven.htm#CACFHDJE ) for more information.

Irfan
  • 607
  • 1
  • 6
  • 12
Edwin
  • 2,671
  • 2
  • 19
  • 24
0

Try adding the jar to the Windows/Unix CLASSPATH system variable.

Joshua
  • 26,234
  • 22
  • 77
  • 106