DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Java in Oracle 8i

  1. #1
    Join Date
    Jan 2003
    Posts
    7

    Question Java in Oracle 8i

    Hi Xperts,

    Is there any limitation to run a java program inside the Oracle Database(Oracle JVM)?

    Is it possible to tuch the O/S file system from my java program running inside the Oracle Database?

    Expecting Xperts result.

    Tnaks in advance.

    Vijay

  2. #2
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    touch ? how so? you mean read a file? write to a file? execute an OS command?

    steve
    I'm stmontgo and I approve of this message

  3. #3
    Join Date
    Jan 2003
    Posts
    7
    Hi Stmontgo,

    What sort of java programs(for example, JavaMail) cannot run inside the Oracle Database?

    Yes, i want to access the OS file system, i.e., Reading and Writing files.

    Vijay

  4. #4
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Yes you can do that..and whatever you wanna do..i am providing you with a simple example..

    public class Hello
    {
    public static string world{}
    {
    return "Hello World"
    }
    }

    compile the class using any jdk..

    javac Hello.java

    now you have to load the hello.class in the database which is stored as the schema object..for loading the clas files oracle has a utility called loadjava

    loadjava user/password Hello.class

    Now you need to publish this class

    sqlplus>connect user/password

    now you need to write a wrapper

    create or replace function HelloWorld return Vrachar2 as
    language java name 'Hello.World() return java.lang.string';
    /

    variable myString varcahar2(100)
    call HelloWorld into :myString

    print myString

    MYSTRING
    --------

    Hello World

    /

    you get the idea of class loading :-D

    but need to make sure the user aurora which is the jvm exists in the database for loading classes..

    regards
    Hrishy

    create or replace function HelloWorld as

  5. #5
    Join Date
    Jan 2003
    Posts
    7
    Hi Hrishy,

    Thanks for your ideas.

    Is there any facility available in Oracle Database to send a mail?
    i.e, is there any package available for mailing.

    Vijayakumar.S

  6. #6
    Join Date
    Jan 2003
    Posts
    2

    Smile

    hi vijay

    i saw ur problem yes their is a tool to send the email from oracle server for that u have to install the oracle mail server tool u get that with a.s cd get and install u can check ur mail useing oracle 9i

    phani

  7. #7
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Vijay

    Look for util_smp through which you can send mail from oracle database..search the oracle database admin forums for sending mail from oracle database..you will get quite a few threads with detailed examples..to do that..

    regards
    Hrishy
    Last edited by hrishy; 01-31-2003 at 07:12 AM.

  8. #8
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  9. #9
    Join Date
    Jan 2003
    Posts
    7

    Thanks

    Dear Xperts,

    I'm Really Thankyou all for your help.
    Your code, reference link and ideas helped me a lot.

    vijay

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width