1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

JAVA class files in oracle PLSQL

Discussion in 'Other Development Tools' started by salmankhalid, Aug 3, 2009.

  1. salmankhalid

    salmankhalid Forum Advisor

    Messages:
    116
    Likes Received:
    6
    Trophy Points:
    260
    Location:
    Lahore, Pakistan
    We can use the JAVA class file in our PLSQL code
    Follow the steps.

    1 - Make a java class

    For example:

    Code (Text):

    Public class SimpleJava {
    public void main(String[] args) {
    System.out.println("Here we are");
    }
     
    2- Now we need to load this class in the Database

    Code (Text):
    Oralce_home / bin > loadjava -user scott/tiger SimpleJava.class
    3- Now we need to create a procedure or function that uses that class.
    For example

    Code (Text):

    create or replace procedure call_simplejava
     as language java
     name 'SimpleJava.showMessage()';
     
    Kindly visit this link for details

    http://www.oracle-training.cc/teas_elite_util9.htm
     
  2. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Good article Salman and nice resource you have linked to.