How to execute lines of code by a given amt of time?

Hi,
I want to know how can I execute a certain lines of code repeatedly by every 5 seconds?
e.g. Timer(5 seconds)
execute lines of code;
It is just a while loop, but the condition is set by time.
Thanks

Look up java.util.Timer or javax.swing.Timer

Similar Messages

  • How to execute a java code ...

    how to execute a java code just like in javascript:
    for example in javascript: we can create a function :
    name_fonction=new Function("param1","param2",..., "Instructions");
    but can it be supported in the common java code? how to do it?
    Je suis a little urgent...
    Thanks a lot!!!

    See beanshell
    http://www.beanshell.org/
    which should be include in the next J2SE 6.0 or 7.0.
    See JSR 274 at http://jcp.org/en/jsr/detail?id=274
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                               

  • How to execute a transaction code in prod.Server from development server

    Hi Friends,
    How to execute a transaction code in prod.Server from development server,Pls give me your valuable suggestions...
    Regards,
    V.Balaji

    i have  a program in production system if i type the request and execute its sends a mail to my admin saying to transport the request to production system.....thats y??????
    just tell me ur idea.............

  • How can long lines of code be cut / separated into multiple short

    In Java, How can long lines of code be cut / separated into multiple short lines?
    Example
    System.out.printf( "%d\t%d\t%s\t%s\t%s\t%s\t\t%s\n", arrayIndex ,  part[ arrayIndex ], name[arrayIndex], units[arrayIndex], price[arrayIndex], units[arrayIndex] * price[arrayIndex], total[ arrayIndex ]   );Thanks

    System.out.printf( "%d\t%d\t%s\t%s\t%s\t%s\t\t%s\n",
    arrayIndex , 
    part[ arrayIndex ],
    name[arrayIndex],
    units[arrayIndex],
    price[arrayIndex],
    units[arrayIndex] * price[arrayIndex],
    total[ arrayIndex ]   );P.S. It looks to me like you have an array for each attribute of something. This is not OO and you should consider creating a class holding the information about each 'Part' or whatever it is. You will then just need a collection of Parts.

  • How to execute these T-Codes like BLOC , BUNL

    Dear All,
    How to execute these T-Codes like BLOC , BUNL.
    Follow this path to view these T-Codes.
    ( 1.) Execute CO02 or CO03.
    ( 2.) Put the Order Number & select Display Overview & Press Enter.
    ( 3.) At Status , you will see an Information Button in Blue colour. (Blue Coloured Button with i written on it)
    ( 4.) Press this i button.
    ( 5.) Below you will see the filter button , here it is written ACTIVE STATUS.
           Click once on it. It will display ALL STATUSES.
    ( 6.) Here we see a List of Status. Click once on any one & then click on F1 button.
    ( 7.) A new screen will open. Click on the "Where Used List".
    ( 8.) It will now show the list of T-Codes.
    What these T-Codes depict ?
    How to execute these T-Codes ?
    Thanks & Regards,
    Vivek Sharma

    Hi,
    These are the Business Transactions which can be possible withe the Status on which you have pressed F1.
    BLOC - Lock
    BUNL - Un-lock
    Etc..
    Check for these Business Transactions in the T.Code: BS22
    Best Regards,
    Siva

  • How to execute mb31 transaction code

    Hello,
        Please tell me how to execute mb31 tcode for creating a GR for Order.
    Even after giving a destination storage location, the material shows 0 stock in MMBE
    Please reply
    Thanks & regards,
    Priyanka

    give following details
    Document Date in Document : The document date is the date on which the original document was issued.
    Posting Date in the Document :Date which is used when entering the document in Financial Accounting or Controlling.
    Delivery NOTE: if you wish to give its external no range
    Moment type: 261
    Order: if you have order no any
    plant & Storage Location as required

  • How to execute My Javascript code from command line or through perl or VB

    Hi Forum,
    I am a new bie, just 2 days old to acrobat and javascript, and I am basically a perl developer
    Here with I have created a small script to merge two pdf
    // Create a new PDF document:
    var newDoc = app.newDoc();
    // Insert doc1.pdf:
    newDoc.insertPages({
    nPage : -1,
    cPath : "/d/sathish/1.pdf",
    // Insert doc2.pdf:
    newDoc.insertPages({
    nPage : newDoc.numPages-1,
    cPath : "/d/sathish/2.pdf",
    // Save the new document:
    newDoc.saveAs("/d/sathish/myNewDoc.pdf");
    My code is working fine and merging properly,
    Is there any way to execute this script through commandline or using some other scripting languages like perl or through VB
    My objective is to automate the merging process without any manual intervention, I don't want to open acrobat manually to execute this javacript, i want to automate that process too,
    Please suggest me which will be very helpful to me,
    Thanks in advance
    Thanks & Regards
    Sathish V.

    Hi Sathish,
    did you find a solution for this? I am looking for the same thing. I want to write a program(perl, batch script, etc.) which could automatically convert pdf to excel without any manual intervention.
    I have the acrobat javascript which could achieve this, but it can only be executed in arobat consolt.  I need it to be able to get executed in a script to automate the processing.
    thanks
    Warren

  • How to execute an java code in pl/sql

    hi frnzzzzz....
    iam new to java and sql both..... and i whant to execute an java program at pl/sql window. do i have to write an code on java source in program unit of pl/sql editor (i.e is in File>>new>>program window>>java source), if yes then i have done
    (i have writtttten
    create or replace and compile java source named tt as
    public class tt
    public static int entry()
    return(10);
    that and after pressing f8
    i gott up the message compiled successfully, and after that i am wondering that how i can run it .
    and if i have write an seprate code using notepad then i have done that tooooo....
    but now what to do to load java in my pl/sql window?????????
    plz. help me out...

    Hhhhhhhhhhhaaaaaaaaaavvvvvvvveeeeeeeee
    yyyyyyooooooooouuuuuuuuuurrrrrrrrrr
    kkkkeeeeeyyyyyyyybbbbbboooooooooaaaarrrrrrrrrddddddddd
    ffffffffiiiiiiiiiixxxxxxxeeeeeeeeedddddddddd
    ffffiiiiiiiirrrrrrrsssssssssssssttttttttt,,,,,,
    ppppppppppplllllllllzzzzzzzzzZZzzzzzzzzzzzzZzzzzzzzzzz
    !!!!!11!1!!11111!loool

  • How to execute app from code in Mac OS X?

    I would like to launch another application from my Java code which will run on OS X. Doesn anyone know how to do this? I think it involves the "Runtime.getRuntime.exec()" method, but I'm not sure how to tell it which application to launch.
    Thanks

    Apple has a technote that describes what you are looking for:
    http://developer.apple.com/technotes/tn/tn1168.html

  • How to execute a loop for a user specified amount of time

    This seems like it should be a no brainer. But I can't figure it out. What's the best way to execute a loop for a user specified number of seconds?

    You can use the Elapsed Time Express VI (available in LabVIEW 7.0 and later).  I have attached a sample VI saved in LabVIEW 7.1 format that shows how to use this Express VI.
    Good luck,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    Elapsed_Time.vi ‏71 KB

  • How to execute PL/SQL query based on given input parameter

    Hi all,
    I have a pl/sql code which is in Region source. It extracts data from database. I want to execute the code based on input I give. I have to give date as a input parameter.
    e.g.
    If I give date1 as a parameter, then following code should executed
    select col1, col2,..... from Table where date1 between '01-jan-2010' and '31-jan-2010'
    If I give date2 as a parameter, then following code should executed
    select col1, col2,..... from Table where date2 between '01-jan-2010' and '31-jan-2010'
    Your help is very much appreciated.
    Leo

    Check the datatemplate,lexicals and beforeTrigger for this in documentation.
    check this
    Lexical reference issue in EBS

  • How to find the t-code of a given ABAP report, if any?

    How to find tcode if any assigned to a report program (ABAP) ?
    Instead of going to SE38, then test - run direct thru F8. An alternate fast way?
    Thanks,

    Hi,
    In order to check T.code assigned to an ABAP program, go to se38 and click on display which will open the ABAP code of the program. Now on this screen press CtrlShiftF5. On the left side of the screen you will find the object associated with the ABAP program. Expand on the object Transactions, which will show you the T.Code associated with the program.
    Hope this helps.
    VK

  • How to Execute FEBP and FEBA transaction codes

    Hi All,
    Can you please explain me how to configure customizing for FINISTA in EBS.
    And also can you plz explain how to execute the t codes FBEP and FBEA.
    regards
    Madhavi

    Hi
    Enter T.Code: MIGO
    Select : Other
    Movement Type : 561
    In the item Details Entyer the material . enter the quantity. Plant and Storage Location.
    Save it. CHekc the Stock In MMBE for that material.
    Thanks & Regards
    Ram

  • To execute from ABAP code an external Unix program

    HI,
    I would like to know how to execute from ABAP code an external Unix program and check for a return code?

    HI,
    There are different ways to this:
    (1) OPEN DATASET <file> FOR OUTPUT 'unix command'
    CLOSE DATASET <file>
    This command executes the unix command and writes the output into <file>
    Look into OSS Note 9391.
    (2) or try the following program but unfortunately the command CALL SYSTEM is
    not supported by SAP. If you are on R/3 2.1 - 2.2x you can get some idea's from the program SAPMSOS0.
    REPORT ZUNIXCOM .
    DATA: U_COMMAND(200).
    Table for system messages
    DATA: BEGIN OF RT OCCURS 100 ,
    LINE(100) ,
    END OF RT .
    START-OF-SELECTION .
    MOVE 'unix command' to U_COMMAND .
    REFRESH RT.
    CALL 'SYSTEM' ID 'COMMAND' FIELD U_COMMAND
    ID 'TAB' FIELD RT-SYS .
    LOOP AT RT.
    WRITE : / RT-LINE .
    ENDLOOP. 
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Trap the currently executing line number?

    Hi,
    how can one get the number of the currently executing line of code?
    Like what is generated when there are compilation/runtime errors.
    I saw LineNumberReader() & getLineNumber() but they seem to be for reading files or a jpanel (I think).
    thanks,
    HSC

    ok, with all your help I managed to get this:
                //----------------- stack trace for debugging ------------------           
                StackTraceElement[] e = new Throwable().getStackTrace();
                StackTraceElement stack[] = e;
                // stack[0] contains the method that created the exception.
                // stack[stack.length-1] contains the oldest method call.
                // Enumerate each stack element.
                //for (int i=0; i<stack.length; i++)
                int i=0;
                String filename = stack.getFileName();
    if (filename == null) {
    // The source filename is not available
    String className = stack[i].getClassName();
    String methodName = stack[i].getMethodName();
    boolean isNativeMethod = stack[i].isNativeMethod();
    int line = stack[i].getLineNumber();
    System.out.println(
    " >>className =" + className +
    " >> methodName =" + methodName +
    " >> line = " +line
    // } //end-for
    //----------------- stop stack trace for debugging ------------------
    Still don't quite understand it all but considering I've been learning java on my own for about 3 weeks I figure I'm doing better than a lot of newbies. - I am frustrated as hell, but I don't give up!
    thanks.
    Note: anyone looking for code examples you can look at: "The Java Developers Almanac 1.4" http://javaalmanac.com/

Maybe you are looking for