Importing a class called Textreader

Hi,
Sorry ive searched the forums and i know theres loads of topics aleady started on this subject but im new to java and im having trouble understanding how to import classes that ive got from another source so that i can use it in my own classes.
Should i just store the class i want to use in the same directory as my own class or must i use the import command to do it?
Thanks.

just a little point .. if you know what package your class to be imported belongs to you could put in an appropriate package directory structure and import or if the class does not have a package declaration then you could place it in your current dir and give an appropriate import statement.

Similar Messages

  • 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

  • Forms 10.1.2 - Imported Java Classes are not running on JNI.NEW_OBJECT call

    Hi All,
    I've created a java class to call a webservice. This has been developed and tested in JDeveloper and works ok (using JDev Wizards - so it's generated code). I've created the JAR from it, imported the classes into Forms Builder and have my package and imported the java exception_ class too.
    So, everything compiles and looks good. When I run the application I can see in the console that my JAR is included in the loaded list. When I call the class (basing my code on the Forms Webservice example here on OTN) it doesn't work. I get the error ORA-6503 - function returns no value.
    I can step through the code in debug and it's in the generated constructor "new" function when the JNI.NEW_OBJECT is executed. I can't see into that so I'm a bit stuck ... I don't whether it's my java that is now failing or the system is failing to call it :
      FUNCTION new(
        a0    VARCHAR2) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_STRING_ARG(args, a0);
        RETURN (JNI.NEW_OBJECT('oracle/forms/atrium/wsexport/proxy/AtriumExportWSSoapHttpPortClient', '(Ljava/lang/String;)V', args));
      END;Has anyone any experience or pointers for me ?
    Are there any extra JAR files I need to include in the CLASSPATH ?
    Forms Builder is 10.1.2.0.2, the Application Server is 10.1.2.3 and it JDeveloper 10 compiling Java 1.4. All on a Windows platform.
    TIA
    Steve

    Not sure if this is exact the document you are searching for, but this one works for me:
    http://www.oracle.com/technetwork/developer-tools/forms/webservices-forms-11g-094111.html
    It's for 11g, but I don't think there is much difference to 10g.
    Did you add your Jar file also to the classpath in the environment file of your webconfig?
    cheers
    Edit: too slow somehow -.- heading for a cup of black coffee
    Edited by: christian erlinger on 03.09.2010 01:18

  • Importing my class files from another folder

    hello everybody ,im creating a software package for a new company and want to organise my class files into different folders so that it would be easier for someone to navigate through them and update if necessary ,how do i import an instance of a class in a file that is in a subfolder of the folder that contains the class that is calling it.(sorry for being a bit long winded) iv tried diff things and they didn't work.
    At the moment i have all the files in the one folder,but as i said above want to put them into appropriate folders.
    I would be very gratefull if someone could give me some examples and if not some appropriate links,thanks iv tried looking for this on the net but could not find anything.

    What you should probably do is to organise your classes into a heirarchy of packages not merely folders. Java expects the package structure to be reflected in the directory structure holding both the source and class files. If it's looking for a class called, say, com.mycompany.widgets.MainWidget it expects to find it in a directory com//mycompany/widgets relative the the directory on the class path.
    Use the package directive in each source file to indicate the package path.

  • A  classpath error while  importing a class with @page import property

    Hi ,
    I am using Tomcat contaniner for jsp applications. I have developed a page that i have import a class. when i use
    <%@ page import="myclass" &>
    i got an error that myclass not found. I have placed into tomcat\webapps\myproject\web-inf\classes directory. So How will I set the classpath for myclass to work?
    thanks.

    I was able to simulate your problem when I created a mismatch in the case of the name of the class.
    for example if my program is called MyClass.java
    and in the import I do <@page import="myclass" %>
    Are you sure about the case of class name that you are using? Please check that the file is called myclass.java the class defined inside it is called myclass and the class file that is copied into the WEB-INF/classes directory is also myclass.class. There should be no difference in the case of the names. like MyClass.java or MyclaSS.class
    Other things to check are
    1. If myclass is defined in a package then you have to import with the package.
    2. Make sure that your jsp is located in the myprojects directory and the class file is copied under myprojects/WEB-INF/classes.
    Let me know if things still don't work
    regards,
    Abhishek.

  • Custom Java class called from RTF template generates error

    We are running a report in BI Publisher and the report calls a custom developed Java class that is used to bind PDFs together and sent the result to another application.
    On the RTF template we have some XSLT that reads the input XML and sets a variable which is then passed to the Java class. We are however getting the following error when the report is called simultaneously 2 or more times:
    XML-22044: (Error) Extension function error: Error invoking 'JavaClassName': 'java.lang.Error: Cannot interweave overlay template with pdf input, combined number of pages is odd!
    I read this as the real cause of the error is the Java code but I'm not 100% sure. Also I don't understand what the error message means.
    Could someone help out please?
    Many thanks

    Since our this requirement is in Quotes module, its not using OAF. It is using plain JSPs and java classes.
    What i was thinking is, create the Option values as flex fields, and write a custom java class to fetch these data from the flex tables and use it in the JSP.
    The main problem we are facing now is,
    "...we wrote a simple java class, which establishes database connection, executes a simple insert & select query to our custom table. compiled & placed the class file under our new pkg structure under $JAVA_TOP eg. oracle.apps.xxx.quot.tmpl , bounced the apache."
    But when we tried to import this class in the jsp (which is being customized), the app just throwed Internal Server Error and we couldnt find any info in the Log file.
    Couldnt guess, why is this simple thing failing. Any idea ?

  • Importing a class from another context?

    Hi JSP techies,
    Im using RESIN and having a simple problem of figuring out how to import classes from another context, if Im using the right word.
    ie.
    My .jsp files are under $home/resin/doc/test dir. And in the jsp file, I would like to import a servlet class or a plain java class. But the servlet classes and all other classes are located under $home/resin/webapps/project/WEB-INF/classes/a/b/c
    Hence when I say
    <% page import="a.b.c.*" %>
    I get an error saying "a" not found.
    1. When I say "servlet classes are in a different CONTEXT", is that right? or is it just another directory?
    2. How can I make the jsp file import the classes from the servlets class path?
    Note: Ofcourse, when I copy the package to the
    $home/resin/doc/WEB-INF/classes dir, everything works fine. But thats simply not an efficient way to get around. Could anyone clear my doubts on this regd.?
    Thanks in advance.
    Arun

    Oh... I get it now. I'm sorry, I had you poorly misunderstood. You are trying to import servlets from another web app or servlet context. I would suggest you put servlets that are common to all web apps in the system classpath and not tie them to any particular web app. In other words create a package directory structure from the system's root directory or any where outside of any web apps and point the system classpath to the beginning of that directory structure. I have a similar thing going with Tomcat. I have a folder in my root called Java_Class which is in my classpath. I build all common utilities in this directory. So I have a com/craig/web structure that holds my AppServlet which is in package com.craig.web. This servlet is visible to all web apps via the Windows classpath. Servlets particular to an application like say an MusicOrderProcess servlet would reside in a package under the webserverhome/webapps/MusicStore/WEB-INF/classes directory where webserver home is the home directory of the webserver you are using. I've tested this across webservers as well (orionserver and Tomcat) and it works.
    From the prompt you include in your posts I am guessing that you are running on UNIX. Move your common servlets out of their respective web apps and into a common directory structure. Configure the UNIX $CLASSPATH (or is it $classpath?) environment variable to point to this sturcture and you'll be on your way!
    Post again if you have more questions!

  • Importing a class CEX file using TOOL

    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL code? Is there
    a class in one of the libraries that I can use to do such a task?
    If anyone has some insight into such an endeavor (positive or negative)
    please respond!
    As well, I would like to express my appreciation for this mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    -----Original Message-----
    From: [email protected] [SMTP:[email protected]]
    Sent: Wednesday, May 13, 1998 3:54 PM
    To: [email protected]
    Cc: [email protected]; [email protected];
    [email protected]; [email protected]
    Subject: Re: Backing up an Environment
    Hi Daniel,
    How can you use RpClean on an environment repository
    which is C-tree ? (Or is there a way to store it as B-tree
    with Forte R3 ?)
    Note also that your Name Server performances may be
    dramatically impoverished after several applications
    install/uninstall (say 8 or 10), once your Env. Mgr repository
    has grown pretty big. The only way to recycle it is then to restart
    it from an export file with the -b option.
    Please let me know,
    Vincent
    On Wed, 13 May 1998 00:03:52 +0200 Daniel Nguyen
    <[email protected]> writes:
    Hi,
    It is normal. The Export of the Environment only contains node
    definitions.
    You should also loose your partitioning definition in your Workshop.
    Have you tried the RpClean on the environment repository ?
    I would use the export file only after a crash of the environment on
    production
    site or restart from a backup of the environment repository without
    the
    user
    connexions.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Chael, Tom wrote:
    Every time I export my environment definition and rebuild the
    environment repository I loose my application definitions. I have to
    go into Econsole/Escript to Uninstall and reinstall my applications.
    Is this normal? I am on a Windows NT environment running Forte
    2.0.H.1. I have verified that I am using the correct .edf file when I
    do my environment rebuild.
    -----Original Message-----
    From: Don Nelson [SMTP:[email protected]]
    Sent: Wednesday, April 29, 1998 5:35 PM
    To: Sanchez, Bernardo
    Cc: '[email protected]'
    Subject: Re: Backing up an Environment
    Sanchez,
    Try this simple escript:
    findactenv
    exportenv
    exit
    Note that this will only export the active environments - no
    simulated
    environments will be exported.
    It's also a good idea to rebuild your environment repository
    every now and
    then. How often you do it depends partly on how many and how
    often you do
    deployments, installations, or other changes to the environment.
    However,
    once a month is not a bad starting point.
    Don
    At 04:54 PM 4/29/98 -0400, Sanchez, Bernardo wrote:
    We are currently running a cron job to backup & clean ourCentralRepository
    (bt:central) on a daily basis. This works OK.
    We would also like to backup our forte environment on a weeklybasis. Does
    anyone have a script to do this?
    Thanks in advance.
    Bernardo Sanchez DMC Inc.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with high numbers, you need higher math." - Hobbes
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    You don't need to buy Internet access to use free Internet e-mail.
    Get completely free e-mail from Juno at http://www.juno.com
    Or call Juno at (800) 654-JUNO [654-5866]
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL code? Is there
    a class in one of the libraries that I can use to do such a task?
    If anyone has some insight into such an endeavor (positive or negative)
    please respond!
    As well, I would like to express my appreciation for this mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    -----Original Message-----
    From: [email protected] [SMTP:[email protected]]
    Sent: Wednesday, May 13, 1998 3:54 PM
    To: [email protected]
    Cc: [email protected]; [email protected];
    [email protected]; [email protected]
    Subject: Re: Backing up an Environment
    Hi Daniel,
    How can you use RpClean on an environment repository
    which is C-tree ? (Or is there a way to store it as B-tree
    with Forte R3 ?)
    Note also that your Name Server performances may be
    dramatically impoverished after several applications
    install/uninstall (say 8 or 10), once your Env. Mgr repository
    has grown pretty big. The only way to recycle it is then to restart
    it from an export file with the -b option.
    Please let me know,
    Vincent
    On Wed, 13 May 1998 00:03:52 +0200 Daniel Nguyen
    <[email protected]> writes:
    Hi,
    It is normal. The Export of the Environment only contains node
    definitions.
    You should also loose your partitioning definition in your Workshop.
    Have you tried the RpClean on the environment repository ?
    I would use the export file only after a crash of the environment on
    production
    site or restart from a backup of the environment repository without
    the
    user
    connexions.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Chael, Tom wrote:
    Every time I export my environment definition and rebuild the
    environment repository I loose my application definitions. I have to
    go into Econsole/Escript to Uninstall and reinstall my applications.
    Is this normal? I am on a Windows NT environment running Forte
    2.0.H.1. I have verified that I am using the correct .edf file when I
    do my environment rebuild.
    -----Original Message-----
    From: Don Nelson [SMTP:[email protected]]
    Sent: Wednesday, April 29, 1998 5:35 PM
    To: Sanchez, Bernardo
    Cc: '[email protected]'
    Subject: Re: Backing up an Environment
    Sanchez,
    Try this simple escript:
    findactenv
    exportenv
    exit
    Note that this will only export the active environments - no
    simulated
    environments will be exported.
    It's also a good idea to rebuild your environment repository
    every now and
    then. How often you do it depends partly on how many and how
    often you do
    deployments, installations, or other changes to the environment.
    However,
    once a month is not a bad starting point.
    Don
    At 04:54 PM 4/29/98 -0400, Sanchez, Bernardo wrote:
    We are currently running a cron job to backup & clean ourCentralRepository
    (bt:central) on a daily basis. This works OK.
    We would also like to backup our forte environment on a weeklybasis. Does
    anyone have a script to do this?
    Thanks in advance.
    Bernardo Sanchez DMC Inc.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with high numbers, you need higher math." - Hobbes
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    You don't need to buy Internet access to use free Internet e-mail.
    Get completely free e-mail from Juno at http://www.juno.com
    Or call Juno at (800) 654-JUNO [654-5866]
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Importing java class in servlet

    hi,
    i need to import a java class file in a servlet. how do i do that.
    also, when i remove the following lines, the import & the line following line,
    //JavaClass class=new JavaClass();
    msgsend class=new msgsend();
    it compiles ok, else i get the error,
    out.println cannot resolve symbol.
    the code of the servlet is as follows:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import "msgsend.class";
    * @author A
    * @version
    public class myemail2 extends HttpServlet {
    String to,bcc,cc,from,subject;
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    HttpSession session = request.getSession();//geting a new session everytime this is called
    PrintWriter out = response.getWriter();
    try
    System.out.println(1);
    response.setContentType("text/html");
    out.println("<html>");
    out.println("<head>");
    out.println("<title> </title>");
    out.println("</head>");
    to=request.getParameter("to");
    from=request.getParameter("from");
    bcc=request.getParameter("bcc");
    cc=request.getParameter("cc");
    subject=request.getParameter("subject");
    System.out.println(to);
    //JavaClass class=new JavaClass();
    msgsend class=new msgsend();
    System.out.println(2);
    out.println("<body align= center bgcolor='white'>");
    out.println("<br><br><br><br><H2 align=center> ");
    out.println("<FONT color=#ffffff face=arial size=2></FONT>");
    out.println("</FORM>");
    out.println("</B><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><pagebreak>");
    out.println("<footer align=center><font size=1><a href='/wpc.html'>");
    out.println("Home Page");
    out.println("</a></footer>");
    //place javascript function for exiting window
    out.println("</form>");
    out.println("</body>");
    out.println("</html>");
    } catch(Exception e){ }
    out.close();}
    pls help,
    thanx,
    ashna

    You have to do like the others import. You have to put import and the complete path(with all the packages).
    For example:
    import mypackage.msgsend;
    and if you wouls like to import all the classes of a package use:
    import mypackage.*;

  • "Import Java Classes"in Oracle6i Forms

    Hello
    I have two questions regarding importing java classes in Forms 6i
    1- How we can add my own class to this list, so that I can import it directly in form 6i and use it?
    2- When these classes are used in form development, are they fully imported to client side or only class wrapper is ported to forms. I m asking this question, cuz I want to develop my application with all bussiness logic(Java classes) in middle tier ie Form Server.
    Can anyone guide me in this regard
    Thanks in advance
    Asif

    OK answers to the questions are:
    1) If your class is on the classpath it will be picked up by the Java importer but you have to restart Forms if you add the class to the path
    2) THe java importer is for middle tier. In Forms, all ofthe application logic is on the middle tier and if you want it integrate this with Java the importer will create a PLSQL wrapper to call the Java - in pretty much the same way as ORA_FFI. (So NOT imported into the client)
    There are some white papers on OTN.
    Regards
    Grant

  • RE: Importing a class CEX file using TOOL

    What exactly are you trying to do when you say "import"? I can think of
    two possibilities:
    1. You simply want to import the text of the file, in which case
    you can use Forte's File class.
    2. You actually want to load the class definition and instantiate
    an object based on that class. If so, you will need to deploy the class
    in a library and use Forte's dynamic class loading and instanceAlloc().
    This is well documented in the Forte manuals.
    CJ
    Chris Johnson
    BORN Information Services, Inc.
    612-417-6035 (direct)
    612-510-4077 (pager)
    -----Original Message-----
    From: Geoffery Whitington [SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 9:24 AM
    To: [email protected]
    Subject: Importing a class CEX file using TOOL
    > ----------
    > From: Geoffery
    Whitington[SMTP:[email protected]]
    > Sent: Thursday, May 14, 1998 9:24:28 AM
    > To: [email protected]
    > Subject: Importing a class CEX file using TOOL
    > Auto forwarded by a Rule
    >
    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL
    code? Is there
    a class in one of the libraries that I can use to do such a
    task?
    If anyone has some insight into such an endeavor (positive or
    negative)
    please respond!
    As well, I would like to express my appreciation for this
    mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    > -----Original Message-----
    > From: [email protected] [SMTP:[email protected]]
    > Sent: Wednesday, May 13, 1998 3:54 PM
    > To: [email protected]
    > Cc: [email protected]; [email protected];
    > [email protected]; [email protected]
    > Subject: Re: Backing up an Environment
    >
    > Hi Daniel,
    >
    > How can you use RpClean on an environment repository
    > which is C-tree ? (Or is there a way to store it as B-tree
    > with Forte R3 ?)
    > Note also that your Name Server performances may be
    > dramatically impoverished after several applications
    > install/uninstall (say 8 or 10), once your Env. Mgr repository
    > has grown pretty big. The only way to recycle it is then to
    restart
    > it from an export file with the -b option.
    >
    > Please let me know,
    >
    > Vincent
    >
    > On Wed, 13 May 1998 00:03:52 +0200 Daniel Nguyen
    > <[email protected]> writes:
    > >Hi,
    > >
    > >It is normal. The Export of the Environment only contains
    node
    > >definitions.
    > >You should also loose your partitioning definition in your
    Workshop.
    > >Have you tried the RpClean on the environment repository ?
    > >I would use the export file only after a crash of the
    environment on
    > >production
    > >site or restart from a backup of the environment repository
    without
    > >the
    > >user
    > >connexions.
    > >
    > >Hope this helps,
    > >
    > >Daniel Nguyen
    > >Freelance Forte Consultant
    > >
    > >Chael, Tom wrote:
    > >>
    > >> Every time I export my environment definition and rebuild
    the
    > >> environment repository I loose my application definitions.
    I have
    > >to
    > >> go into Econsole/Escript to Uninstall and reinstall my
    applications.
    > >> Is this normal? I am on a Windows NT environment running
    Forte
    > >> 2.0.H.1. I have verified that I am using the correct .edf
    file when
    > >I
    > >> do my environment rebuild.
    > >>
    > >> -----Original Message-----
    > >> From: Don Nelson [SMTP:[email protected]]
    > >> Sent: Wednesday, April 29, 1998 5:35 PM
    > >> To: Sanchez, Bernardo
    > >> Cc: '[email protected]'
    > >> Subject: Re: Backing up an Environment
    > >>
    > >> Sanchez,
    > >>
    > >> Try this simple escript:
    > >>
    > >> findactenv
    > >> exportenv
    > >> exit
    > >>
    > >> Note that this will only export the active
    environments - no
    > >> simulated
    > >> environments will be exported.
    > >>
    > >> It's also a good idea to rebuild your environment
    repository
    > >> every now and
    > >> then. How often you do it depends partly on how many
    and how
    > >> often you do
    > >> deployments, installations, or other changes to the
    > >environment.
    > >> However,
    > >> once a month is not a bad starting point.
    > >>
    > >> Don
    > >>
    > >> At 04:54 PM 4/29/98 -0400, Sanchez, Bernardo wrote:
    > >> >
    > >> >We are currently running a cron job to backup & clean
    our
    > >> CentralRepository
    > >> >(bt:central) on a daily basis. This works OK.
    > >> >
    > >> >We would also like to backup our forte environment on
    a weekly
    > >> basis. Does
    > >> >anyone have a script to do this?
    > >> >
    > >> >Thanks in advance.
    > >> >
    > >> >Bernardo Sanchez DMC Inc.
    > >> >
    > >> >
    > >> >
    > >> >-
    > >> >To unsubscribe, email '[email protected]' with
    > >> >'unsubscribe forte-users' as the body of the message.
    > >> >Searchable thread archive
    > >> <URL:http://pinehurst.sageit.com/listarchive/>
    > >> >
    > >> >
    > >>
    > >> ============================================
    > >> Don Nelson
    > >> Regional Consulting Manager - Rocky Mountain Region
    > >> Forte Software, Inc.
    > >> Denver, CO
    > >> Phone: 303-265-7709
    > >> Corporate voice mail: 510-986-3810
    > >>
    > >> aka: [email protected]
    > >> ============================================
    > >>
    > >> "When you deal with high numbers, you need higher
    math." -
    > >Hobbes
    > >>
    > >> -
    > >> To unsubscribe, email '[email protected]' with
    > >> 'unsubscribe forte-users' as the body of the message.
    > >> Searchable thread archive
    > >> <URL:http://pinehurst.sageit.com/listarchive/>
    > >-
    > >To unsubscribe, email '[email protected]' with
    > >'unsubscribe forte-users' as the body of the message.
    > >Searchable thread archive
    > ><URL:http://pinehurst.sageit.com/listarchive/>
    > >
    >
    >
    > You don't need to buy Internet access to use free Internet
    e-mail.
    > Get completely free e-mail from Juno at http://www.juno.com
    > Or call Juno at (800) 654-JUNO [654-5866]
    > -
    > To unsubscribe, email '[email protected]' with
    > 'unsubscribe forte-users' as the body of the message.
    > Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hello,
    I don't know about any forte classes to do the job.
    But, if it just automating the imports that you are concerned with
    then you can accomplish it using fscript.
    For eg. in UNIX machines you can write a shell script to go through
    a directory, get all files with .cex extension and call fscript which
    would open a workspace/repository and do an import plan.
    Hope this helps
    Santha Athiappan
    From [email protected] Thu May 14 09:23:53 1998
    Received: (from sync@localhost) by pebble.SageIT.com (8.6.10/8.6.9) id IAA01294 for forte-users-outgoing; Thu, 14 May 1998 08:43:25 -0700
    Received: (from uucp@localhost) by pebble.SageIT.com (8.6.10/8.6.9) id IAA01283 for <[email protected]>; Thu, 14 May 1998 08:43:22 -0700
    Received: from descartes.com(205.210.27.1) by pebble.sagesoln.com via smap (V2.0)
    id xma001277; Thu, 14 May 98 08:43:10 -0700
    Received: by descartes.com with Internet Mail Service (5.5.1960.3)
    id <KRDBVHV9>; Thu, 14 May 1998 11:45:11 -0400
    Message-ID: <[email protected]>
    From: Geoffery Whitington <[email protected]>
    To: "Johnson, Chris CWT-MSP" <[email protected]>
    Cc: [email protected]
    Subject: RE: Importing a class CEX file using TOOL
    Date: Thu, 14 May 1998 11:45:10 -0400
    X-Mailer: Internet Mail Service (5.5.1960.3)
    Sender: [email protected]
    Precedence: bulk
    Reply-To: Geoffery Whitington <[email protected]>
    Hi Chris,
    The goal that I want to achieve is this: at runtime, read a CEX file from
    my filesystem and "import class" it into my workspace. It is equivalent to
    invoking the menu item "Component,Import Class/Interface".
    Basically I am generating hundreds of TOOL classes and I don't want to
    manually import them myself. I am aware of the Forte Code generator, but
    the classes I wish to generate are much too complex for the generator (I
    want virtual attributes based upon NonKeyAttributes, with their own Set and
    Get methods, as well as methods with changing/variable parameters -
    something I believe that the generator cannot handle).
    Cheers,
    Geoff Whittington
    -----Original Message-----
    From: Johnson, Chris CWT-MSP [SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 11:19 AM
    To: 'Geoffery Whitington'; [email protected]
    Subject: RE: Importing a class CEX file using TOOL
    What exactly are you trying to do when you say "import"? I can think
    of
    two possibilities:
    1. You simply want to import the text of the file, in which case
    you can use Forte's File class.
    2. You actually want to load the class definition and instantiate
    an object based on that class. If so, you will need to deploy the class
    in a library and use Forte's dynamic class loading and instanceAlloc().
    This is well documented in the Forte manuals.
    CJ
    Chris Johnson
    BORN Information Services, Inc.
    612-417-6035 (direct)
    612-510-4077 (pager)
    -----Original Message-----
    From: Geoffery Whitington [SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 9:24 AM
    To: [email protected]
    Subject: Importing a class CEX file using TOOL
    From: Geoffery
    Whitington[SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 9:24:28 AM
    To: [email protected]
    Subject: Importing a class CEX file using TOOL
    Auto forwarded by a Rule
    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL
    code? Is there
    a class in one of the libraries that I can use to do such a
    task?
    If anyone has some insight into such an endeavor (positive or
    negative)
    please respond!
    As well, I would like to express my appreciation for this
    mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    >
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Sequence of the classes called in a standard BADI

    Hi guys,
       I have a problem on the sequence of the classes called in a standard BADI occuring in different system.
       In the DEV system, the sequence called is A, B, C (Just to illustrate). But, in the QA and PROD system, the sequence called is B, C, A. Versions of each objects have been compared and found to be the same.
       Any ideas how to solve this?
       Thanks!

    Hi Ndruzz,
    Every BADI by default Implements an INTERFACE which already contains some methods with parameters.
    So you have to find the relavenet method based on the related paramters (by checking the fields in that paramters) you have to double click on the method and to write the code.
    see the doc
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.

  • "1046: Type was not found" for a custom class calling a custom class

    This should be easy... but I've spent two days on nothing but this error.... I am absolutely at my wit's end.
    Basically, I've got a "character" container linked to a MovieClip in the library that is supposed to act as a container for various body parts; head, shirt, pants, etc. For simplicity, I've just got Character class and Head class, both in a "char" package, both classes are named the same as their respective files (Character.as and Head.as, both in an actual file called "char"). Character class is supposed to create an instance of Head, but I always get this 1046 error. The problem is that I've got other body parts with nearly identical classes that ARENT throwing a 1046 error and are working just fine. I went and made a new project to see if I was still having the problem with just character calling 1 simple body part. I do.
    In the symbol properties, it's Exported for Actionscript & Export in Frame 1... the class is "char.Head" and "char.Character" respectively. I have tried everything I can find or think of, I've done dozens of Google searches and sifted through dozens of forums. I can't find anything and I've been working on this problem for 24 straight working hours now. I'm completely exasperated......
    package char {
    import flash.display.MovieClip;
    import flash.display.Stage;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.geom.ColorTransform;
    import fl.motion.Color;
    import char.Head;
    public class Character extends MovieClip {
    // 1046: Type was not found or was not a compile-time constant: Head
    private var _head:Head;
    // reference to get the stage later
    private var stageRef:Stage;
    public function Character(stageRef:Stage=null) {
    trace("NEW CHARACTER");
    //1180 Call to a possibly undefined method Head;
    _head=new Head();
    And here's the contents of Head.as
    package char {
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.display.Stage;
    import flash.geom.ColorTransform;
    public class Head extends MovieClip {
    private var skin_type:uint;
    public function Head() {
    trace ("NEW HEAD");
    Now if I declare the head variable and create a new instance of it in my document class, no problem whatsoever. If I do it in my Character class, it just doesn't stop giving me this error!!! Somebody please help me.
    1046: Type was not found or was not a compile-time constant: Head
    1180 Call to a possibly undefined method Head;

    There is a blank movieclip named Character in the library, yup.
    Also in my main handler for my document class calls "mainCharacter = new Character(); "
    Here's a chunk of the code from the document class. For the record, it calls "head" as just a test and that works fine. Just doesn't work in "Character"
    import char.Character;
    import char.Head;
    public class MainHandler extends MovieClip {
    private static var _instance:MainHandler;
    public static function get instance():MainHandler { return _instance; }
    public var mainCharacter:Character;
    public var head_:Head;
    public function MainHandler() {
    _instance = this;
    mainCharacter = new Character();
    head_=new Head();

  • Why do we import a class

    Why do we import the class TestFile and not call the class instead like in the code given below
    package test;
    import testing.TestFile;
    import java.util.StringTokenizer;

    "import" basically just defines aliases for class names. It lets you specify just the class name, without the full path. It makes the code easier to read.
    You don't really call classes at all in Java. You call methods. You can do that later in the code.

  • Problem When Import Java Class -compilation error

    Hi all
    I made a java class that has methods to return Screen width and Height .
    package tarek;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    public class Screen
    Dimension dim ;
    public Screen()
    dim = Toolkit.getDefaultToolkit().getScreenSize();
    public double getWidth()
    double w = dim.getWidth();
    return w;
    public double getHeight()
    double h=dim.getHeight();
    return h;
    I made the jar file " screen.jar" and make it ready to use in form builder
    I opened form builder and make import java class (From program>import java class>choose the class anc click import)
    The class now imported successfully and the PL/SQL package body is:
    PACKAGE Screen /* tarek.Screen */ IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT;
    -- Method: getHeight ()D
    FUNCTION getHeight(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER;
    -- Method: getWidth ()D
    FUNCTION getWidth(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER;
    END;
    Now I made a button on the form and i WRITE THIS CODE TO INVOKE THE CLASS on when_button_pressed
    DECLARE
         vScreen_Class ORA_JAVA.JOBJECT;     
    BEGIN
         vScreen_Class := SCREEN.NEW;
    END;
    My problem is I have compilation error
    error 306 AT LINE 5 , COLUMN 25
    wrong number or types of argument in call to "NEW"
    I do not know what is the reason of this compilation error?
    Is it because the method in java return "double datatype" while in oracle return "number datatype"
    Please help
    Edited by: [email protected] on Dec 28, 2009 10:24 AM

    Sarah, I ca not move my thread to JDeveloper because it is not java issue. The problem is with my PL/SQL code and the way I make Import Java class to forms Builder. The Java code is OK.
    Andreas Thank you so much for replying. In fact I made a full compile "Ctrl+Alt+K". but still error
    The following is the package Body
    PACKAGE BODY Screen IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('tarek/Screen', '()V', args));
    END;
    -- Method: getHeight ()D
    FUNCTION getHeight(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'tarek/Screen', 'getHeight', '()D', args);
    END;
    -- Method: getWidth ()D
    FUNCTION getWidth(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'tarek/Screen', 'getWidth', '()D', args);
    END;
    BEGIN
    NULL;
    END;
    ---------------------------------------------------------------------------------

Maybe you are looking for