-1

I have one jar in oracle database and i want to call that jar and send some parameters to the main class function

    public getOffer(String name 1,String name2){

    } // function that in main class in jar 

how to implement this. Waiting for helpful replies Thanks in advance guys.

SURJA
  • 17
  • 7
  • Don't just repeat the same question over and over again. Improve the first one insted. http://stackoverflow.com/questions/17021844/sending-parameter-to-main-class-function-in-jar – maba Jun 10 '13 at 11:39

2 Answers2

0

import that jar in your program and create object of that class and simple call that method by object.methodname and necessary parameter that methods required

shreyansh jogi
  • 2,082
  • 12
  • 20
0

To call a Java method inside the oracle database you have to make this method static (like a main(String[]) method.

After that you have to create a PL/SQL-wrapper:

create or replace function get_offer(name1 in varchar2, name2 in varchar2) return varchar2
is language java name 'MyClass.getOffer(java.lang.String,java.lang.String) return java.lang.String';
/

See also the Oracle Documention.

Uwe Plonus
  • 9,803
  • 4
  • 41
  • 48