How can we call one java class in another java class?

Hi all,
My problem is ,
one java code creates a file i have to send that file through email as an attachment here i wrote a java code to send a mail with attachment
can any one help me how i can implement this. my idea is to write a send mail function in 1st java code which creates the file
Is this a better idea ???plz suggest me.

Hi all,
My problem is ,
one java code creates a file i have to send that file
through email as an attachment here i wrote a java
code to send a mail with attachment
can any one help me how i can implement this. my idea
is to write a send mail function in 1st java code
which creates the file
Is this a better idea ???plz suggest me.may samaaj nahi atay

Similar Messages

  • How can i call one report from another report (Drill Down Approach)

    Hi Friends,
    I've two reports in completely different layout format.
    One is in Crosstab & another is in Tabular.
    Now i want to call my Tabular report(report 1) from my Crosstab (report 2) without using BO's default drill down feature. Or, you can show using BO's feature if it supports my requirement.
    How to do that?
    Is it at all possible?
    Please share your thoughts. Thanks in advance for your time.
    Regards.
    Satyaki De.

    hi
    you can use openDocument for this.
    [http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf]
    I would suggest to use variables that build the HTML code for the hyperlinks dynamically, and display them in your crosstab. Set the display option for the related cells (ie. the cells where your variables are displayed in) so that the cell's contents as interpreted as HTML code.
    Regards,
    Stratos

  • How can i call a jasper report from a java Application

    Hi,
    i am chiranjit , currently i working in a web based ERP project, in this project as a report building tool we are using JasperReport wih eclipse plugin . in eclipse report's are generating very well but i am unable to call that report from a java application because i have no idea about the How to call a Jasper Report from a Java Application . so please send me the necessary class names, jar files names and programe code as early as possible.
    Chiranjit

    Ahh, kind of a duplicate thread:
    http://forums.java.sun.com/thread.jspa?threadID=631642
    @OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can i call a VB6 project from my java application using JNI

    hi
    can anyone tell me the procedure of calling a VB6 project from any java application using JNI
    if anyone does know then tell me the detail procedure of doing that. I know that i have to create a dll of that VB6 project then to call it from the java application.
    if anyone know that procedure of creating dll file of an existing VB6 project please reply
    please if anyone know then let me know

    Ahh, kind of a duplicate thread:
    http://forums.java.sun.com/thread.jspa?threadID=631642
    @OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can I call a static function in another static function?

    /** = d, as a String, using exactly 5 characters.
    Precondition: 0 <= d <= 999.
    The truncated d will have one of the forms: ddd.d, dd.dd, and d.ddd.
    Examples are: 360.1, 29.50, 4.003, 0.001, and 0.000
    public static String truncateTo5(double d) {
    // To get the desired output, do the following
    // 1. If d < 0.001, set d to 0.
    // This prevents d appearing in scientific notation, e.g. 1.5E-6.
    // 2. Convert d to a string s, in the usual way.
    // s is guaranteed to have a decimal point in it a digit before
    // and after the decimal point.
    // 3. Append zeros to s (if necessary) until s has 5 digits.
    // 4. Return s.
    String s= "" + d;
    if (d < 0.001) {
    d= 0;
    return "0.000";
    if (s.length() > 5) {
    return s.substring(0,5);
    if (s.length() == 3) {
    int l= s.length();
    return s.substring(0, l) + "00";
    if (s.length() == 4) {
    int l= s.length();
    return s.substring(0, l) + "0";
    return s;
    /** = d, but rounded (if necessary) to its first 5 characters.
    PreconditionL 0 <= d <= 360.
    E.g. round 1.3546 to 1.355. round 1.3544 to 1.354.
    E.g. round 21.995 to 22.00. round 21.994 to 21.99.
    E.g. round 130.59 to 130.6. round 130.54 to 120.54.
    public static String roundTo5(double d) {
    // Hint. Rounding to an integer j is usually done by
    // truncating the value j + 0.5.
    // E.g. Change 10.6 to 11.1 and truncate to 11
    // E.g. Change 10.4 to 10.9 and truncate to 10
    // You need to do this sort of thing, but what you add may depend
    // on how big d is.
    What I need to do is call the truncateTo5() in the roundTo5() in order for this to work properly but I dont know how. Can someone help?

    @captfoss: If they're static methods in the same class, you don't even need to do that. You can just call the method unquallified.
    @OP: First off, when you paste code, wrap it in code tags. You can find them between Quote and Help.
    As for your error, you have defined truncateTo5() to take a double as an argument. When you call it, you are not passing it a double and you get that error.

  • How can I have one drum sample mute another in Garageband?

    I'm trying to set up a situation where the muted surdo hit (in the world jam pack) cuts off the decay of the full surdo hit. Much like a closed hihat hit would cut off the decay of an open hihat. I'm using a DRUMKAT as the controller. How can I make this happen?

    With Safari open use the Command + T keyboard shortcut to open a new tab.
    Or, Command + N to open a new window.

  • How Can I Call the method in WAR project's class?

    Message was edited by: JUNHA SHIN

    I have one correct Web Moudule Project.
    The EAR project(EmployeeCardJdoEar) added the WAR archive
    (EmployeeCardJdoWar) is run correctly.
    I want to add the war archive to my WD project.
    because, the war project contain business logic to be reused.
    so. i had enrolled in my WD project's properties ->
    Web Dynpro References -> Sharing References ->
    sap.com/EmployeeCardJdoEar.
    but, this method in WAR(EmployeeCardJdoWar) occurs Exception.
    Context ctx = new InitialContext();
    pmf = (PersistenceManagerFactory)
               ctx.lookup("java:comp/env/jdo/defaultPMF");
    I think lookup call is not run correctly.
    But, this lookup is run correctly in my EAR project.

  • HOW CAN I CALL ONE REPORT TO ANOTHER REPORT

    HAI,
            I HAVE TWO REPORT LIKE ZREPORT1 & ZREPORT2 .
       NOW I WANT CALL ZREPORT1 IN  ZREPORT2.
        IS IT POSSIBLE .
         IF SO HOW ?
    THANK YOU
    ASHOK KUMAR

    hi Ashok
    use following code with ur reports changing the names in bold....
    SUBMIT <b>ZRPT_SO_PO_N</b> <i>ZREPORT1</i> TO <b>SAP-SPOOL</b><i>ZREPORT2 </i>
                      WITH ........ur specification......
    Sachin

  • How can i call a main method  from a different class???

    Plzz help...
    i have 2 classes.., T1 and T2.. Tt2 is a class with a main method....i want to call the main method in T2......fromT1..is it possibl..plz help

    T2.main(args);

  • How can i put one small image on another big image at particular point

    Hi,
    I have combined two images but new mask image is totally overwrite and come in whitecolored not in original color.....
    I have user CGImageMaskCreate, CGImageCreateWithMask......
    But i want to put small image on big image at particular point...... that i m tired to search but i can't find.......
    Any thing is remaining then pls tell me...
    Thanks,
    Haresh.

    Check the Quartz2D documents on Apple's site. Do a search in your examples folder in the developer folder and on Apple's site for Masks. I haven't used them under this API but that's probably the best place to start.

  • How can we call a class file of one package for class file of another

    How can we call a class file of one package from class file of another package and both packages exist in a same folder

    How can we call a class file of one package from
    class file of another package and both packages exist
    in a same folder
    Luckily they don't so it's really not a problem after all.

  • How can I call a variable from another class

    hi
    If I have two classes : one and two
    In class two I have a variable called : action
    In class one I want to check what is the value of action.
    How can I call action?

    Thank you scorbett
    what you told me worked fine, but my problem is that MyClass2 is an application by itself that I don't want to be executed.
    Creating myClass2 as in the following:
    MyClass2 myClass2 = new MyClass2();
    [/code]
    executes myClass2.
    Can I prevent the exectuion of MyClass2, or is there another way to call the variable (action)?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to call a Java class from another java class ??

    Hi ..... can somebody plz tell me
    How to call a Java Class from another Java Class assuming both in the same Package??
    I want to call the entire Java Class  (not any specific method only........I want all the functionalities of that class)
    Please provide me some slotuions!!
    Waiting for some fast replies!!
    Regards
    Smita Mohanty

    Hi Smita,
    you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
    e.g.
    you have developed A.java and B.java, both are in same package.
    in implementaion of B.java
    class B
                A obj = new A();
                 //to access A's methods
                 A.method();
                // to access A's variable
                //either
               A.variable= value.
               //or
               A.setvariable() or A.getvariable()

  • How can I call a nonstatic class

    Hello All,
    I've wrote a simple bean for my testcase that count a value (e.g. site access):
    public class Bean1 {
    private int accessCount = 1;
    public int getAccessCount() {
    return (accessCount++);
    If I call the bean with a jsp-site, it works fine with different scope. e.g. session and application.
    With session scope different browser count different. With application scope different bowser count together. Thats the normal attitude.
    My jsp code:
    <jsp:useBean id="counter" class="ml.view.Bean1" scope="session" />
    <jsp:getProperty name="counter" property="accessCount" />
    This don't work with a static bean (normal too), but I can only call a static class in my UIX site.
    I call the bean from uix with the invoke element. Is that correct? How can I call a nonstatic class with a special scope? Which other solution ist possible?
    My uix code:
    <invoke method="getAccessCount" result="${uix.eventResult.getAccessCount}" instance="${sessionScope.myBean.getAccessCount}" exception="${uix.eventResult.error}" javaType="ml.view.myBean"/>
    Thank you for any solution!
    The error messages are:
    java.lang.NullPointerException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java)
    at oracle.cabo.servlet.event.InvokeEventHandler._invoke(Unknown Source)
    at
    and so forth...

    false in my uix code example: javaType="ml.view.myBean"
    correct: javaType="ml.view.Bean1"
    Sorry :-) that was only an error in my post not in the really example.

  • How to pass a "object" as a prameter from one java class to another java

    hi experts, I want to know "How to pass and get object as a parameter from one java class to another java class". I tried follwoing code just check it and give suggetions..
    import Budget.src.qrybean;
    public class ConfirmBillPDF extends HttpServlet
    qrybean db = new qrybean();
    SimplePDFTable pdfTable = new SimplePDFTable();
    pdfTable.simplePDFTableShow("2010","2011","1","2","1","131","102");
    }Here i want to pass db with simplePDFTableShow method. simplePDFTableShow is in another java class. So how can i do this.
    And also i want to know, how this obj will get.
    please help me.
    Edited by: andy_surya on Jul 14, 2010 7:51 AM

    Hi andy_surya
    what is this i am not understand
    pdfTable.simplePDFTableShow("2010","2011","1","2","1","131","102");but i am try to solve your problem try this
    qrybean db = new qrybean();
    SimplePDFTable pdfTable = new SimplePDFTable();
    pdfTable.simplePDFTableShow(db);and access like this in SimplePDFtable class update your method
    simplePDFTable(qrybean tempDB)
    // write your code
    }

Maybe you are looking for

  • AIR 1.5.2 namespace throws error in FB 3 standalone

    I am developing in the standalone Flex Builder 3 Standard IDE, running the latest Flash Player and matching debug player 10.0.32.18 and have installed the new AIR 1.5.2 runtime. I have an AIR application that is built on the Flex 3.2 SDK. When I chan

  • Athlon II 265 on K9N6PGM2-V

    Hi, I'm using a MSI K9N6PGM2-V and I'm thinking about upgrading the processor pretty soon. At first I was thinking of a AM3 Athlon II 260, since it's pretty much the best of the ones on the list of supported processors for what I'll be using it for.

  • Using RSCRM_BAPI with Huge Data Volume

    Hi, I am using RSCRM_BAPI to extract a query output into a database table. But, the query returns a large volume of data. I am not sure whether RSCRM_BAPI works fine when data volume is huge. Please suggest whether using this will be a good design or

  • CONCATENATE date and time into a text variable

    Hi ABAP Gurus,   I would like to retrieve current system date and time and concatenate into a variable. I would really appreciate if someone could help me. I have the following code and i seem to get some kind of error. I would like my output to be l

  • IPhoto 5.0.4 has just destroyed 5 hours of work!

    Dear all, my girlfriend had just been using iPhoto 5.0.4 (latest version) for 5 hours on our brand new iMac G5, creating a nice book that was supposed to be ordered as printout, when the application suddenly decided to crash. The catastrophe came cle