How to invoke a Java Program from Oracle 10g?(uRGENT)

Hello.
I've a query, that i have a program, that basically retreives the records from the
oracle table and then parser this information and then insert the values in corresponding database base tables. I want that, whenever the new program is inserted, a Trigger should fire and pass the most recently entered record to the Parser Program, means
1) Firing a Trigge
2)Storing the most latest data and pass it to the Parser PROGRAM
Can someone tell me how to do this? How to invoke a Java Program from within the database? Please if anyone has examples provide me. Its very urgent and tell me what is the basic mechanism.
Thankyou.
Ben

With Java Stored Procedures Java may be caleed from a database.
http://www.oracle.com/technology/tech/java/jsp/index.html

Similar Messages

  • Calling Java programs from Oracle Stored Procedure

    Is it possible to call Java programs from Oracle stored procs? If possible Can this be used to exchange data from other applications? Is there a better method/feature in oracle for doing data exchange with other apps?

    If what you mean by Oracle stored procedures is pl/sql then yes.
    You can create a "wrapper" this way:
    CREATE OR REPLACE FUNCTION xmlXform
    in_mapUrl IN VARCHAR2,
    in_inputUrl IN VARCHAR2
    RETURN VARCHAR2
    AS
    LANGUAGE JAVA NAME
    'com.yourcompany.xml2any.xform(java.lang.String,java.lang.String)
    RETURN java.lang.String';
    Then load the java as:
    loadjava -user youruser/youruserpasswd -resolve -verbose lib/xmlparserv2.jar classes/com/yourcompany/xform.class classes/com/yourcompany/xml2any.class
    The java, given the correct permissions, can do anything java can do including communicate with outside applications.
    Is this the "best" way... depends on what you are trying to accomplish.

  • URGENT: How to run a Java program from a different directory?

    Hi.
    How do I run a Java program from a directory that the file is not located in? So lets say im in c:\Java. But the file is in c:\Java\abc\efg\.
    What would be the command to run the Java file from c:\Java.
    I can't remember it and I need it asap.
    Cheers.

    If the class you are trying to run is MyApp.class, try
    c:\Java\>java -cp abc\efg MyAppThe actual classpath you specify will depend on whether or not MyApp.class is in a package (I've assumed it isn't) and whether or not any 3rd party jars are involbed (I've assumed not).
    Edited by: pbrockway2 on Apr 1, 2008 6:42 PM
    The command arguments read as "Run the MyApp class using as a classpath abc\efg relative to here (c:\Java)".

  • How to execute a Java program from ODI

    Hi All,
    I am new to ODI. I would like to know whether its possible to execute a java program from ODI.
    Reason for this is, I would like to write information in error tables into a file. And after that another program will mail that error log to concerned person.
    Could anyone please help me with this?
    Thank you in advance
    Regards,
    Srini

    if you have the java code then u can create a procedure with Java BeanShell as the Technology and write your java code in the procedure

  • How to call a java program in javafx class(Urgent) and even vice versa

    Hi all,
    Here I have two questions:
    1)
    Please let me know how to call a javafx in java program...
    I tried with the following code but it is not working..
    The below is the java program in which I made a call to the Fx program.
    FxMainLauncher.java
    import net.java.javafx.FXShell;
    public class FxMainLauncher {
    public static void main(String[] args) throws Exception {
    FXShell.main(new String[] {"HelloWorld.fx"});
    2) How to call a java program in javafx class
    Here is my javafx program
    import check.*;
    import javafx.ui.*
    var instance = new MyJava();
    //visible:true
    System.out.println("Number is: {instance}");
    Here is my java program
    public class MyJava {
    public static void main(String args[])
    System.out.println("JAVAFX TO JAVA");
    Even this is not working please let me know ASAP
    Thanks in advance,
    V.Srilakshmi

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

  • To invoke a java Program from non-java Clients

    I need to develop a program in java which will be invoked using some non java client. For example: for the time being my java application will be invoked by tandem. Also, a huge volume of transactions can be expected to come in and these need to be processed at high speed(response time of 5 seconds or so). Any suggestions ?

    By Tandem..I mean a non-java client...
    We need to look at possible architectures for implementing the payment module of the an application. We can think of the payment module as a Java process that does the following � 1. validate the card and some other stuff....
    The payment module should be able to support non java clients...
    Take the case when a customer swipes a card at a store.... Another process (call it the router) determines if the transaction info needs to be sent to my java program... If yes , the router invokes my payment module. The router can vary from store to store ... So my Payment module will be invoked by non java clients... As part of deciding on the architecture we need to decide on the protocol used for communication � http/tcp/iiop etc.
    Also, we need to decide on the various options for implementing the payment module.... It can be webservices, EJB Session Beans etc... But the key point is ,.....performance.... A huge volume of transactions can be expected to come in and these need to be processed at high speed(response time of 5 seconds or so).

  • Requesting an overview of how to call a Java program from EBS.

    Hi,
    I am an experienced Java developer in the middle of an implementation of EBS 12g. I am very new to EBS and I'm not sure where to start on this. I need to provide users the ability to call a Java program that prints a report from EBS. I would be grateful if somebody would outline the general approach that should be used. Links to documentation/tutorials are appreciated also.
    Thanks,
    Mike

    Hi,
    I need to provide users the ability to call a Java program that prints a report from EBS. Are you referring to Java concurrent programs? If yes, please see the documents referenced in this thread.
    Java Concurrent Programs
    Java Concurrent Programs
    Regards,
    Hussein

  • How can I extract Java source from Oracle?

    I have an object of type "JAVA SOURCE" in my database. I do not have the source
    code available.
    How can I extract this source from the database so I can read it? I am not a Java programmer, so a sql or pl/sql solution would be greatly appreciated.
    Thanks in advance!

    This query lists any Java object that the current database user has (JAVA SOURCE, JAVA CLASS or JAVA RESOURCE). Use this to determine which Java sources exist.
    SELECT * FROM USER_OBJECTS
    WHERE OBJECT_TYPE LIKE 'JAVA%'This query lists the source of one Java object.
    SELECT * FROM USER_SOURCE
    WHERE TYPE = 'JAVA SOURCE'
    AND NAME = 'com/acme/HelloWorld'Substitue the name of the java class you're interested in for 'com/acme/HelloWorld'.
    I know that the question is four years old, but I had the same question and arrived here via Google, so I figured posting an answer might help others in a similar situation.

  • How to run the java program from another directory?

    Hi
    Assumption:
    data.java is in a package suncertify.db and place in a directory c:/code/suncertify/db/ directory
    data.class file: is in c:/code/suncertify/db/ directory
    current directory: c:/
    How can execute the data.class directly in c:/ directory without changing directory to c:/code/ ?
    Thanks in advance,
    Adrian

    Yes. You can use the -classpath and -sourcepath options to specify where to look for source files, and the -d option to specify where to generate the class files. Look up the usage of those options in the javac documentation:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html

  • Invoking a java program from a shell script!

    Can this be done?
    Ive written a simple compiler for the language buru which just reads/parses and then executes a file for this java like language. But what Im wondering is if I can write a shell script something like this
    #!/bin/bash
    java Interpreter one.buru
    this isn't working so its not correct but if someone knows how to do so there are duke dollars going for it Cheers :)

    The most likely reason is that java is not finding your class.
    That is probably because when you execute the script the "working directory" is not in a location that works with your class path.
    You should be able to find the working directory and class path with the following commands (or some variation of them) added to the beginning of your script.
    cd
    echo $CLASSPATH

  • How to run a java program remotely

    hi,
    i have a simple hello-world java program on my windows machine.
    is it possible to run this program remotely from a linux server?
    any suggestions, links to suggestions will be helpful. thanks!

    i think that would be a problem for me, so i will need to use some other approach. what i'm trying to do actually is that we have a university server which is set up so that students can have combination fo shell and cgi scripts in their home directory and with that, they can have web pages.
    but students cannot use that server to run java applications. so to work around that, i was hoping that i can have my java application, and the database on my own windows machine, and be able to invoke the java program from the shell script on the linux server and once i have my ouptut, i can display that on the web page with CGI script.
    is there any other practical approach that i can use to accomplish the above?

  • Not able to execute one Java program from another one via. exec()

    Hi,
    I am new to this forum, so I might be asking a very trivial quetion.
    My program Ap1 is :
    class Ap1
    public static void main(String a[]) throws Exception
    Runtime rt=Runtime.getRuntime();
    Process p=null;
    p=rt.exec("javac,Pr.java");
    Runtime.getRuntime().exec("javac,Pr.java");
    When I run the above program, I get below error at the line 7(bold one):
    D:\batchwe>javac Ap1.java
    D:\batchwe>java Ap1
    Exception in thread "main" java.io.IOException: CreateProcess: javac,Pr.java err
    or=2
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
    at java.lang.ProcessImpl.start(ProcessImpl.java:30)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
    at java.lang.Runtime.exec(Runtime.java:591)
    at java.lang.Runtime.exec(Runtime.java:429)
    at java.lang.Runtime.exec(Runtime.java:326)
    at Ap1.main(Ap1.java:7)
    Path is set as below(which seems correct):
    D:\batchwe>path
    PATH=C:\Program Files\Java\jdk1.5.0_05\bin
    I am just wondering how to call one Java program from another one?!
    Please help.
    thanks
    Rashmi

    Hi diptaPB,
    Thanks for your suggestion.
    Here is how I tried it again, but not getting the desired output:
    Class Pr looks like below -->
    class Pr
    public static void main(String a[])
    System.out.println("hi from process");
    When I run 'Pr' from command prompt, i get the desired output:
    D:\batchwe>java Pr
    hi from process
    However, when I call 'Pr' from another program Ap2.java, it seems that it does not call 'Pr':
    class Ap2
    public static void main(String a[]) throws Exception
    Runtime rt=Runtime.getRuntime();
    Process p=null;
    String[] cmd=new String[2];
    cmd[0]="javac";
    cmd[1]="Pr.java";
    p=rt.exec("cmd");
    D:\batchwe>javac Ap2.java
    D:\batchwe>java Ap2
    ************* no output appears here***********************
    Looking forward for your help.
    regards
    Rashmi

  • Invoke one java application from another?

    Hello,
    Can anyone tell me how to Invoke one java application from another?
    Suppose I have a small java application say, Hello.java which has its own main() method and
    I also have another java application, say World.java which has its own main() method too.
    What I want to do is invoke or startup World.java from Hello.java.
    If possible kindly give code examples?

    main is just a normal method so Hello can invoke the main method of World just as it would invoke any other method.
    Kaj

  • How to access Data Guard option in Oracle 10g OEM

    Hi All,
    I have Oracle 10g ENTERPRISE EDITION on Unix envoirement. I want to setup logical standby Database through Data Guard technology. But when I brows through OEM I do not find Link for DATA GUARD????
    1) How to access Data Guard option from oracle 10g OEM.
    2) Does It come with Enterprise Edition OR I have to install it separately.
    Regards,
    Darshan

    I am managing almost everything through EM Grid Control. It is easy to setup and configure.
    Anyways, if you have read the documentation on
    Oracle® Data Guard Concepts and Administration and setup your environment accordingly then you should not have any problems. Atleast I can assure you that your production database will not be affected by it.
    Just make sure that you follow each step and read thoroughly. If you have spare machines then you can test and record your configuration before performing it on your production db. This link will provide you with the information on DataGuard.
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/concepts.htm
    If you think that way then you will never be able to do any new stuff since you will always fear that something might go wrong. Go ahead pal, try it on test machines and you will know that it is not that difficult.
    There are real experts who help people like us in this forum and I know that they are doing a pretty good job.
    All the best.
    Rgds
    Adnan

  • How to invoke another Java file in Java program?

    Hello all,
    Now I am building a commnity of agents that can talk in Java, I have another Java-Based dialogue system to handle the dialogue between the agents. But I don'y know how to invoke the Java dialogue system file in the agent class.
    Is there any methods can call another .java file in a Java program?
    Help!!!!!please

    Yep, vaguest of the vaguey vague vague.
    Anyhoo,
    I'm guessing you want to call a method from a different class?
    Assuming you have the "Runner" class and then "Agent1", "Agent2", etc.
    Agent1 whatever = new Agent1();

Maybe you are looking for

  • PO tax and tolerance limits

    Hello everyone,               I have 2 questions. I m configuring for the purchasing process of no capital goods for a japanese company. 1) They have 4 tax codes. They will be using 1 for 80% invoices and they also want to be able to change and put t

  • PM G5 Dual 2.0 Internal Power Button ?

    Hello Does anyone know if the PM G5 Dual 2.0 has an internal Power Button ? If so, where is it exactly ? Thanks Tim

  • App store, Itunes, various apps just say loading and never load

    I have only had my ipod 4 for about a week, and Itunes, The App store, and numerous other apps won't load. Its just a grey screen that says loading. I have WiFi and I just updated my Ipod software last night....I reset my Ipod 4 times. PLEASE HELP!!!

  • Duplication of Code

    Dear Sir I want to explore CS73 display  BOM to excel and second i want where used list for several items.In CS15 it shows 1 material which not acceptable.i want to know which material is used in BOM or not used and even i want to explore CS73 to exc

  • Sync Software Update Crash (Help!)

    I'm traveling and interrupted a software updated between my iPhone 4 and my MBP that seemed to have hanged. I now have the iTunes CDRom icon and a USB icon on my phone. When I connect it to my computer and try and sync I get the "iTunes has detected