Java Importer in Forms 6i

Hi
I am trying to get a class in JavaImporter/form6i list which I have created.
I tried as follows , Could you plz correct me wherever I went wrong.
have created a java file named : HelloWorld.java as
=======================================
package oracle.forms.test;
public class HelloWorld
public static void main(String s[])
System.out.print(“Hello World”);
=========================================
Compiled the java file with command
=========================================
c:\> javac -d . c:\HelloWorld.java
it compiled successfully got created the .class file in "oracle.forms.test"
==========================================
Created a jar file with command
==========================================
jar –cf HelloWorld.jar .\oracle\forms\test\HelloWorld.class
--its done
=====================================
Tested to Run jar file
=====================================
java -cp C:\HelloWorld.jar oracle.forms.test.HelloWorld
got Output : HelloWorld
=================== done good so far =================
My Requirement is
This class file I want to get in listed in JavaImporter of Forms6i.
Thanks.
DJ

Guys, I managed to get it done myself.
Thanks
DJ

Similar Messages

  • Unable to use java importer in Forms

    Hi all,
    When i use "import java classes" from the program menu, i encountered the error
    "PDE-UJI001 Failed to create JVM". Could i get the solution for this error.
    with rgds
    Mons

    make sure that your O/S path contains a JRE/bin directory with a JDK version of at least 1.2.2 and that the importer.jar (usually in %OH%\TOOLS\COMMON60\JAVA) is in the classpath
    Your classpath should also include anything that you actually want to import

  • Java Importer & Forms

    Hi,
    I have a forms application which includes some java, I have imported java into the form using the Java Importer in Form Builder 10g (9.0.4).
    The Big question is where do I put the classes on 10g Application Server (9.0.4.1/Solaris) ? The manual saw " Put the java classes on the middle tier, but where exactly ?
    Do I compile the java classes on the Application Server, can I place in the server as a JAR file or just individual classes ?

    Hi,
    You can deploy the java as jar file and as separate classes, although a jar file is the prefered method.
    Regards,
    Harm

  • Help for using java class in forms 9i

    hi
    i have been trying to use java class in forms9i but unable to execute ,i have encountered exceptions,for which exception handlers have been declared like ora_java.java_error and exception_thrown but failed to handle run time errors , i have tried all ways from my side.
    my java class returns a simple string
    i need help on various work arounds
    thanks in advance
    yash

    sir
    i have written a simple java class which returns a string hello imported using a java importer in forms 9i
    and i call my class in when button press trigger
    i have also imported java.lang.Exception for my exception handlers,i have no compile errors,but when i run my forms i get run time error and my exception handlers fail to trap it . ihave no idea how to proceed .
    should i use bean area in form and call the class using fbean from custom item rigger if so please explain
    can i get sample code example for calling a java class methods from forms.
    thanks
    yash

  • How to run the imported java class in form

    Help!!!!!
    Pls help me to run the imported java class in forms.
    Package is created in forms while imported one class called
    singlexml.class and that package has one procedure and one
    function.
    I just wanted to run that class.I mean the new package.
    Thanks
    Anil

    Hi,
    It is because the converter works on byte code and it only supports a subset of the Java language (see the JC specifications). It is kind of like compiling you code on Java 6 and trying to run it on Java 5. The JCDK outlines the required compiler version.
    Cheers,
    Shane

  • How to import java package in form 10g

    hello
    i have make a java package but its not looking so far possible to include it in java import list, how i can import it in form 10 g

    hi,
    if classpath does not work you can try to add your jar file at this registry key :
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome\FORMS_BUILDER_CLASSPATH
    Engin.

  • Importing java class from forms 6i

    Dear people
    I want to import very simple java class from forms 6i, i went to programs then i choose import java classes, then it gives me error message PDE-UJ1001 failed to create the jvm.
    please tell me how to solve the problem.
    Yasser

    +... not a Java question. Post moved from the New To Java to the Forms forum.+

  • Importing Java classes in Forms 6i

    Hi
    When I try to import java classes using the option available in forms 6i,I get the following error
    PDE-UJI001 Failed to create the JVM.
    ne clue?
    Thanks
    Gangs

    You have installer the JDK 1.2 (This software located in a Sun Microsystems Web Site), and you have a configure the your PATH:
    PATH=%PATH%;< path your JDK installed >;
    If you have Designer 6i installed in your machine, then your Enviromento Variable PATH = PATH=< path your JDK installed >;%PATH%;
    After configure the PATH, you have a create another Enviroment Variable CLASSPATH with:
    Example:
    CLASSPATH=C:\oracle\designer\TOOLS\COMMON60\JAVA\IMPORTER.JAR;c:\jdk1.2.2;
    Test your Forms 6i.

  • JAVA Importer: ORA-105100 can't start the java virtual machine

    Hi,
    i am having trouble to make a work interaction between forms and java.
    My PL/SQL code is calling a java code situated in an imported class.
    the error i get says : can't start the java virtual machine
    I modified the CLASSPATH to add some jar files.
    What else should i do ?
    should i modify LIBPATH ?
    any idea ?
    Thanks
    Dan

    i just found this documentation Oracle Forms Developer and Forms Server 6i (Patch 4) at this adress
    http://download.oracle.com/otn_hosted_doc/forms/forms/p4_relnotef.pdf
    which says that i need jdk 1.2.2 to make it work but the documentation was published in 2001...
    Is there an earlier doc ? or an earlier doc of the java importer ?
    http://www.oracle.com/technology/products/forms/pdf/javaimporter.pdf
    any help would be appreciated

  • Include JAVA program in Forms 6i

    How Can I insert a JAVA program in a form 6i? I have just convert my aplicattion from forms 5.06 to 6.0.8.17.1 and I need a manual explainning how to use JAVA in forms and how to convert my aplicattion for WEB.
    Thanks.

    If you want to deploy on the Web -you do not have to do ANY changes to the forms.
    There are papers on the forms otn page which tells you how to do this.
    If you want to learn about calling java from forms look at the Java Importer. Again, there is a paper on OTN.
    Regards
    Grant Ronald
    Forms Product Management

  • Using java classes with Forms 6i

    Hello everyone,
    I want to use some Java.io functionality in Forms 6i but I'm not sure how to go about doing this. How can I access java classes from a forms application?
    Thanks,
    Wes

    Use th Java Importer - information on otn.oracle.com/products/forms or in the on line help.
    Regards
    Grant Ronald
    Forms Product Management

  • Mixing Java with Oracle Forms 11g

    What's going on is I wrote a program for work that allows the user to upload a document from their computer onto the database and then download it back later. Now I have to take that and integrate it into a button in Oracle Forms because our actual program runs from Forms. I imported the jar into the form and wrote a button with code I found online (modified slightly for my own use of course):
    DECLARE
         jo ora_java.jobject;
         rv varchar(100);
         ex ora_java.jobject;
    BEGIN
         JO := Upload.new;
         RV := Upload.startUploadPage(JO);
    EXCEPTION
         WHEN ORA_JAVA.JAVA_ERROR then
              message('Unable to load Upload page, ' || ORA_JAVA.LAST_ERROR);
         WHEN ORA_JAVA.EXCEPTION_THROWN then
              ex := ORA_JAVA.LAST_EXCEPTION;
              message('Java Error');
    END;
    but when I tried to compile it I got:
    Error 306 at line 8, column 8
    wrong number or types of arguments in call to 'STARTUPLOADPAGE'
    the java method that is supposed to be called here is:
    public static String StartUploadPage() {
    new Upload();
    return Upload.StartUploadPage();
    I did get from someone that apparently as written my code wont work anyway because apparently the jar importer in Forms doesnt transfer UI (ie Java Swing) and that in order to get the UI to transfer I would have to write a JavaBean on top of my code... but 1 I have no clue what a JavaBean is and the research I have done so far about it has just confused me more... and 2 I'm not sure what that has to do with the error considering that the method that is supposed to be being called by the line that threw the error doesn't have any JFrames or Java Swing of any kind connected to it... there is a tiny bit of Swing in the class to open up the first form that has the buttons for upload and download in it but that is all. I have 4 classes in that jar... 3 are the various Java Swing pages and have the absolute minimum logic in them possible... and the 4th one is the one that starts everything going, has the main class, and any serious logic that needs to be done the needed values are passed to that class and that class does all the work... that 4th class is the one that is being called in the PL/SQL. If it isnt any trouble could I maybe get a little help from someone on:
    1. How to write a JavaBean to allow my program to work the way it is supposed to in Forms and
    2. Why I am getting this error and how to make it go away

    Simplemente deberias utilizar la webutil, no hace falta programar nada nuevo, con la webutil puede transferir de un puesto cliente a la database, o viceversa.

  • How to call Java class from Forms 6i?

    Hi friends,
    I need to call a Java class from my Forms 6i application.
    (It runs under WIndows XP. It's a client/server application and I have only the client and the Form builder installed on my PC)
    I don't know almost anything about Java's world so your help would be very useful for me.
    Could you tell me exactly what i have to do?
    I've read in metalink several Notes, but they supposed that the Java architecture is already installed in the computer.... I only have the default installation of Developer 6i... so I would need to know:
    - How to install/configure the neccesary to execute Java classes without problem
    - How to invoke the .class from Forms 6i.
    Thanks a lot
    Jose.

    And also this one:
    Problem Description
    Installed Forms 6i Rel 2 on a MS Windows machine. When trying to Import the Java
    Classes getting the errors
    PDE-UJI0001 Failed to create the JVM
    Solution Description
    You need to to install JDK 1.2.2 to run the Java Importer. And set the PATH's
    and classpath's correctly.
    Explanation
    1. Download and install the JDK 1.2.2.
    Possibly available at: http://java.sun.com/products/archive/
    2. Assuming the JDK 1.2.2 is installed in c:\jdk1.2.2 directory and the JRE in
    C:\PROGRA~1\JAVASOFT\JRE\1.2 directory; ORACLE_HOME=C:\Dev6iR2.
    Set the PATH to
    set PATH=c:\jdk1.2.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin\classic;%PATH%
    ( If you are using ias9i then the JDK 1.2.2 comes with the ias installtion ,
    in this case please set the PATH to
    D:\ias9i\Apache\jdk\bin;D:\ias9i\Apache\jdk\jre\bin;D:\ias9i\Apache\jdk\jre\bin\classic;%PATH% )
    3. Set the CLASSPATH to set CLASSPATH=%CLASSPATH%;C:\Dev6iR2\TOOLS\COMMON60\JAVA\IMPORTER.JAR;.
    (If you do not set the CLASSPATH correctly you will get the error
    PDE-UJI002 Unable to find the required java importer classes)
    4. Now run the Forms Builder by using the command.
    C:\Dev6iR2\bin\ifbld60.exe
    Now the Java Importer Should Run fine.
    Francois

  • Implementing java beans in forms 10g [Problem]

    Hi All,
    I am trying to implement the java bean in the forms 10g
    I performed the following steps, but no luck.. Could anybody please help me in this?
    I have created a simple java class
    package mypackage1;
    public class MyClass
    public String GetString(String a)
    return a;
    Make a jar myjar.jar out of it.
    Copy this jar files in $ORACLE_HOME/forms/java directory
    and set the archive.jini parameter in formsweb.cfg to
    archive_jini=frmall_jinit.jar,Myjar.jar
    Created a simple form having one button, one textbox
    Set the implementation class property of text item to mypackage1.MyClass
    on button pressed trigger, I wrote
    set_custom_property('block2.text_item4',1,'GetString','Hello World');
    Ideally, on button pressed, it should show the text "Hello World" in the etxt box. But on button pressed nothing is happening and in java console on error is appearing.
    My java console output is
    Loading http://asst104253:8889/forms/java/frmall_jinit.jar from JAR cache
    Loading http://asst104253:8889/forms/java/Myjar.jar from JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Could anyone please tell me what I am doing wrong?? And how do I achieve this functionality??
    Please, any help appreciated !!

    Hi there
    The is plenty wrong with this code:
    1. MyClass is not extending VBean
    2. There is no public boolean setProperty(ID ID, Object args) method and no property IDs have been defined so set_custom_property('block2.text_item4',1,'GetString','Hello World'); will not execute anything
    3. If you're hoping to return values back from the bean, you need to define a custom event and associated ID.
    If you're just looking for some java code to return values in a similar manner as normal Oracle functions then you may want to consider using forms java stored procedures which are based on static java methods. Beans are really more for interaction type stuff with other applications.
    But any way if you want to do it this way (i.e. using beans) then at very least you class should look something like (Note, I have not compiled is so there may be a few errors):
    package mypackage1;
    import oracle.forms.handler.IHandler;
    import oracle.forms.ui.CustomEvent;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.VBean;
    import oracle.forms.engine.Main;
    import oracle.forms.engine.*;
    import oracle.forms.handler.*;
    public class MyClass extends VBean
    // initiating event id
    protected static final ID pgetString = ID.registerProperty("GetString");
    // return value id
    private static final ID preturnValue = ID.registerProperty("returnValue");
    // return event id
    protected static final ID preturn = ID.registerProperty("returnEvent");
    static IHandler mHandler;
    public String GetString(String a)
    // may do some string manipulation here.
    return a;
    public boolean setProperty(ID ID, Object args)
    if (_ID== pgetString)
    if (_args instanceof String)
    String myArg = (String)_args;
    mHandler.setProperty(preturnValue,getString(myArg));
    CustomEvent ce = new CustomEvent(mHandler, preturn);
    dispatchCustomEvent(ce);
    Keep your button as is and then to return the value back into forms place a WHEN-CUSTOM-ITEM-EVENT trigger on the bean area with something like this:
    DECLARE
         BeanValListHd1 PARAMLIST;
         ParamType NUMBER;
         EvenName     Varchar2(20);
         CurrentValue Varchar2(2000);
    BEGIN
         BeanValListHd1 := get_parameter_list(:SYSTEM.CUSTOM_ITEM_EVENT_PARAMETERS);
         IF :SYSTEM.Custom_Item_Event = 'returnEvent' THEN
              IF iD_NULL(BeanValListHd1) THEN
              MESSAGE('NO PARAMETER FOUND FOUND');     
              ELSE
              GET_PARAMETER_ATTR(BeanValListHd1,'returnValue',ParamType,CurrentValue);
              MESSAGE('IN CUSTOM EVENT THE STRING RETURNED IS '|| CurrentValue);
              END IF;
         ELSE
              MESSAGE('no value');
         END IF;          
    END;
    hope this helps
    Q

  • Invoking Java classes from Forms

    We are running an AIX Forms server, and we would like to be able to execute a java class with two command-line parameters (ex. "java myClass.class param1 param2"). Is the "java" run-time executable available on AIX? I'm assuming it would be part of the JRE installed with Oracle 8.1.6, but where might I find it, and can it be called with the HOST() command?
    Thanks,
    Jonathan

    I think if you have forms server installed you will have a java runtime there on the disk somewhere.
    Regarding activating the java check out the "java importer" tool that comes with patch 4 of developer 6i.
    null

Maybe you are looking for

  • How to Use Same Navigation Panal for two different query

    Hello, My requirement is I have to display three different report in same web template in three different tab. I have created a custom web template with tab. in each tab i have assigned three different analyser table and assigned three different repo

  • Time Machine locked disk

    Connected a WD My Book pro to my G5 PM running OS 10.5.1. After a few minutes into the first backup it failed the backup with the message: Time Machine Error - Unable to complete backup. An error occurred while creating the backup directory. Tried de

  • Want to trigger at selection screen on 'X'  using mouse click event.

    I've designed a report which has two radiobuttons i would to like change the selection screen depends on the selection of the button as of now i'm selecting the button and hitting enter so that at selection screen on radiobutton group triggers.but fo

  • Why is there no restore to time capsule disk?

    It's pretty clear from the previous discussions that, although there's a clear way to backup a Time Capsule's disk via the Airport Utility "Archive Disk ...", there's no easy way to restore a time capsule's disk from an archive.   This lack of restor

  • My wifi just stops working on ipad.

    To fix it i have to turn wifi off and on and it is anoying especialy when watching videos online. Any help?