This discussion is archived
12 Replies Latest reply: Mar 8, 2013 10:42 AM by Subhash Kurni RSS

Oracle Forms invoking an applet!!!

Subhash Kurni Newbie
Currently Being Moderated
Hi,
I have an applet and a client java file,
using client java file I can invoke an applet, and in developer suite , I have imported the client java file into the forms,
I can see the client package body and spec.

On click of a button I am able to call the client java and this client invokes the applet as well and works fine..I have placed the (fmx)form in forms folder and mysampleapplet.jar and client java file both in the java folder and have added into archive_jine in formsweb.cfg.

All works fine for me in the developer suite,,,but when i copy the same fmx file, mysampleapplet.jar and client java file into an oracle 10.1.2.3 server and then the start the server and click the button, i cant see the applet at all,,,its hanged...

I have added tge mysampleclient.jar in archive_jini in formsweb.cfg file..

Please help me.

Thnx,
Subhash
  • 1. Re: Oracle Forms invoking an applet!!!
    Subhash Kurni Newbie
    Currently Being Moderated
    Can anyone please respond to this,,plzzzzzzz

    Edited by: Subhash Kurni on Mar 4, 2013 8:51 AM
  • 2. Re: Oracle Forms invoking an applet!!!
    tony.g Journeyer
    Currently Being Moderated
    Do you see any errors on the Java console?

    Tony
  • 3. Re: Oracle Forms invoking an applet!!!
    CraigB Guru
    Currently Being Moderated
    Remember, Forms runs on the application server (AS) and is presented on the client. Your Java Applet is probably running on the AS. If you need the Java Applet to run on the client, you will need to execute it from the client.

    Craig...
  • 4. Re: Oracle Forms invoking an applet!!!
    Subhash Kurni Newbie
    Currently Being Moderated
    Thnx for the response,
    No I dont see any errors in the console!!
  • 5. Re: Oracle Forms invoking an applet!!!
    Subhash Kurni Newbie
    Currently Being Moderated
    Not sure, what it means Craig,
    but it works for me when I run the same with developer suite, and i can see the applet popping up when i click the button in the browser,, and am calling the fmx from browser!!.



    Thnx,
    Subhash

    Edited by: Subhash Kurni on 4 Mar, 2013 9:34 PM
  • 6. Re: Oracle Forms invoking an applet!!!
    CraigB Guru
    Currently Being Moderated
    Subhash,
    but it works for me when I run the same with developer suite,
    Yes, this would work because your OC4J Container - the equivilent of an Application Server (AS) is running on your workstation. However, when you run this form from your actual AS, the Java Applet will run on the AS not your client desktop. This is the basic topology of Web Forms. The form runs on the AS and the UI is displayed on the Client. The Form does not actually run on the Client. Does that make sense? Take a look at An Overview of Oracle Forms Server Architecture for detailed information on how Web Forms work.

    Basically, if you need the Java Applet to run on the Client, you will have to distribute the Java Bean to your Client and then execute the Java Bean using WebUtil's Client_HOST() method.

    Craig...

    Edited by: CraigB on Mar 5, 2013 8:22 AM
  • 7. Re: Oracle Forms invoking an applet!!!
    Subhash Kurni Newbie
    Currently Being Moderated
    Oh ok,,,
    Thnx for the clarity,
    Can I have an example of the same where in i can invoke an applet on the click of a button in the forms and I need to deploy this on Oracle 10.1.2.3 app server.

    I just followed the link
    http://forms.pjc.bean.over-blog.com/categorie-453384.html , the example works fine ,

    So I just added a java class inside my myapplet.jar,,

    package oracle.forms.fd;
    class Client
    {
         public String getVal(String myVar)
         {
              MyApplet app = new MyApplet();
              String retValue = app.getEncVal(myVar);
              return retValue;
         }
    }


    My Applet will not be disposed until it returns the retValue;

    Based on the link
    I did
    FBean.Register_Bean('BL1.IMAGEPICKER',1,'oracle.forms.fd.Client');
    :BL1.File := FBean.Invoke_char('BL1.IMAGEPICKER',1,'getVal','"Hello World"');

    I copied the myapplet.jar into java folder and added to archive_jini in server/formsweb.cfg file.

    But this doesnt work at all, :(

    Please let me know how to do this,,,I tried even by signing the jar. :(

    Thnx,
    Subhash
  • 8. Re: Oracle Forms invoking an applet!!!
    Subhash Kurni Newbie
    Currently Being Moderated
    Hi Craig , i thought about it but still I am kinda not convinced because, I copied the URL and opened the same URL in different systems and it was working well, my applet was popping up very well, so its not dependent on the system where the developer suite is there....rite..

    Anyways I havent gone through the architecture doc link provided by you,,


    Thnx,
    Subhash
  • 9. Re: Oracle Forms invoking an applet!!!
    CraigB Guru
    Currently Being Moderated
    Bases on your statement,
    ...I have imported the client java file into the forms, I can see the client package body and spec.
    It sounded like you were implementing a Pluggable Java Component (PJC) not a Java Bean.

    If you are simply implementing a Java Bean like the one referenced in the link you provided, then "Yes", this should run from the client - not the Application Server. I recommend you take a look at How Do I Debug Oracle 9i Forms Developer Pluggable Java Components?. I would also recommend you send a lot of time on Francois Degrelle's web pabe Oracle Forms Community - Pluggable Java Components & Java Beans' Library as you will a log of useful information there including information on how to debug your Java Bean.

    Craig...
  • 10. Re: Oracle Forms invoking an applet!!!
    Subhash Kurni Newbie
    Currently Being Moderated
    Hi Craig, was expecting response to
    Can I have an example of the same where in i can invoke an applet on the click of a button in the forms and I need to deploy this on Oracle 10.1.2.3 app server.

    I just followed the link
    http://forms.pjc.bean.over-blog.com/categorie-453384.html , the example works fine ,

    So I just added a java class inside my myapplet.jar,,

    package oracle.forms.fd;
    class Client
    {
    public String getVal(String myVar)
    {
    MyApplet app = new MyApplet();
    String retValue = app.getEncVal(myVar);
    return retValue;
    }
    }

    My Applet will not be disposed until it returns the retValue;

    Based on the link
    I did
    FBean.Register_Bean('BL1.IMAGEPICKER',1,'oracle.forms.fd.Client');
    :BL1.File := FBean.Invoke_char('BL1.IMAGEPICKER',1,'getVal','"Hello World"');

    I copied the myapplet.jar into java folder and added to archive_jini in server/formsweb.cfg file.

    But this doesnt work at all, :(

    Please let me know how to do this,,,I tried even by signing the jar. :(

    Thnx,
    Subhash

    Please let me know whether the approach if fine. I need to deploy this on Oracle 10.1.2.3 app server _

    Thnx,
    Subhash

    Edited by: Subhash Kurni on Mar 6, 2013 10:36 AM
  • 11. hnx,
    Subhash Kurni Newbie
    Currently Being Moderated
    Hi Craig,

    Not sure what you meant by saying that it doesnt work on App server for the Link pasted by me, It indeed works for me even on App server.


    Even my applet also works on the App server.

    Thnx,
    Subhash

    Edited by: Subhash Kurni on Mar 8, 2013 10:41 AM
  • 12. Re: hnx,
    Subhash Kurni Newbie
    Currently Being Moderated
    Thnx,
    Subhas

    --Subhash                                                                                                                                                                                                                                       

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points