Home » Developer & Programmer » JDeveloper, Java & XML » Loading Java class into Oracle.
Loading Java class into Oracle. [message #91965] Thu, 01 January 2004 20:17 Go to next message
Jeffrey
Messages: 30
Registered: January 2003
Member
Is it possible to load Java classes into Oracle? What I want to do is to fire a Oracle trigger that will call a function or procedure which is written in Java to complete a Database operation.

If it is possible, where should I start first. By the way, I am using Oracle 9i (9.2)

Thanks in advance!
Re: Loading Java class into Oracle. [message #91967 is a reply to message #91965] Fri, 02 January 2004 04:01 Go to previous messageGo to next message
Frank Naude
Messages: 4581
Registered: April 1998
Senior Member
Hi,

Yes, it is possible to load Java Classes into Oracle using the "loadjava" tool. One can use loadjava to load *.class, *.java, *.properties, *.sqlj, *.ser, *.jar, or *.zip files. Look at this example:

loadjava -user scott/tiger@orcl -verbose -debug My.class


The "Oracle9i Java Developer's Guide" should address all your concerns. If you have any specific questions, please post them here.

Best regards.

Frank
Re: Loading Java class into Oracle. [message #92584 is a reply to message #91965] Sat, 25 September 2004 12:22 Go to previous message
amar
Messages: 14
Registered: October 2000
Junior Member
You need to compile your class first with SQLJ
for that you would need transfer.zip given by oracle

once this is done
you can use below command to load class in oracle

loadjava {database credentials} <java file name>

After class is loaded , it can be called in proc or trigger
using below syntax

language Java
name 'classname.methodname()';
/

try this out

All the best!

thanks
Amar
Previous Topic: jdbc error
Next Topic: Reading a XML file in ORACLE 8i
Goto Forum:
  


Current Time: Mon Nov 25 20:35:45 CST 2024