Is it possible to automate the running of a java program multiple times?

For example, i have a java program which constantly writes the word "hello world" to a text file and ends the program.
Instead of compiling & running this multiple times is there a way to automate it and it will run it many times as you want?

Theresonly1 wrote:
For example, i have a java program which constantly writes the word "hello world" to a text file and ends the program.
Instead of compiling & running this multiple times is there a way to automate it and it will run it many times as you want?What do you mean by "constantly" and "many times as you want"? Do you mean literally constantly -- as soon as it runs, it runs immediately again?
Or do you mean something like running it once every half hour indefinitely?
What i was looking for is something along the lines of a script file or Ant. Like an automation tool. How is this not answering your own question? You can use a script, or Ant.

Similar Messages

  • Is it possible to automate the process...?

    Dear members!
    Is it possible to automate the process of subtitling? For example if I have MS Word file with the following table:
    Starting Timecode
    Ending Timecode
    Language of Original
       Local       Language   
    0001
    00:00:06:00
    00:00:06:01
    0002
    00:01:10:18
    00:01:12:02
    0003
    0004
    Is there any way to put that file on timeline in Premiere to superimpose subtitles with dialogues (for example) of Original Language? Can anyone give me step-by-step instruction on how to do that? I can edit text file in MS Word and delete unneeded column. Manual making of a few thousand titles is so boring!
    As a result I have to export AVI file with superimposed subtitles on screen.
    Thanx in advance to everybody!

    I believe that using After Effects is a lot easier because you can change the source text with keyframes.
    Take a look at this thread and watch the tutorial I did to demonstrate this.
    http://forums.adobe.com/message/4770932#4770932

  • Is it possible to automate the command enabling?

    Is it possible to automate the command enabling in acrobat 9 through SDK.
    If so kindly advice me.

    Hi Pradubass,
    By "command enabling" I assume you mean the usage rights for commenting, saving, etc in the free Adobe Reader? No, there is no way to automate that process via JavaScript. Adobe sells a server product that does that called Adobe LiveCycle Reader Extension Server ES.
    Hope this helps,
    Dimitri
    WindJack Solutions
    www.pdfscripting.com
    www.windjack.com

  • Is it possible to get the updated table records based on date & time.

    Is it possible to get the updated table records based on date & time in oracle.
    Thanks in advance.

    no, actually i am asking update records using 'UPDATE
    or DELETE' statement, but not insert statement.
    Is it possible?
    I think we can do using trigger on table, but problem
    is if i am having 20 tables means i have to write 20
    trigger. i don't want like this.Of course it's still possible, typically you'll find applications with a column LAST_UPDATE, probably a LAST_UPDATED_BY and so on column. You don't say what your business need is, if you just want a one of query of updates to particular records and have a recent version of Oracle, then flashback query may well help, if you want to record update timestamps you either have to modify the table, or write some code to store your updates in an audit table somewhere.
    Niall Litchfield
    http://www.orawin.info/

  • CFMCPopupMenu is shown multiple times if the menu key (VK_APPS) is pressed multiple times

    Hello,
    I have a problem with the CFMCPopupMenu in a Visual Studio Professional 2013 Update 4 created MFC DLL (Regular DLL using shared MFC DLL) and in a dialog based MFC application (others I didn't test - maybe in an SDI application too).
    If the menu key (VK_APPS) is pressed multiple times, the context menu is created and shown multiple times. 
    When pressing the Alt (VK_MENU) key or clicking with the mouse buttons the menu is not shown multiple times. 
    It seems to be bug in CDialogImpl::PreTranslateMessage case WM_CONTEXTMENU where it is tested if a popup menu is already shown 
    and if there is an active popup menu this popup menu is closed, but only if the pMsg->wParam == VK_MENU.
    The problem occurs in a dialog based MFC application and in dialog's in regular DLL's. 
    In case of MFC MDI applications the problem does not occur, 
    because in the CFrameImpl::ProcessKeyboard the key is passed to the popup menu for processing pActivePopupMenu->SendMessage(WM_KEYDOWN, nKey); and eaten up.
    You can reproduce the problem in the following way:
    1. Create a dialog based MFC application with the Visual Studio 2013 wizard.
    2. Add a menu IDR_MENU1 to the resource.
    3. Add a ON_WM_CONTEXTMENU / OnContextMenu message handler to the dialog.
    4. Insert the following code into the OnContextMenu handler of the dialog:
      _ASSERT(!CMFCPopupMenu::GetSafeActivePopupMenu());
      CMenu m;
      m.LoadMenu(IDR_MENU1);
      CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
      pPopupMenu->SetAutoDestroy(FALSE);
      VERIFY(pPopupMenu->Create(this, 100, 100, m.GetSafeHmenu(), TRUE, TRUE));
    5. Compile and start the application and press the Menu Key (VK_APPS) multiple times.
    -> You run into the ASSERT.
    If you press the Alt-Key or left click with the mouse multiple times all is fine.
    You can also add a tracepoint in the constructor and destructor to see that the CMFCPopup menu is created multiple times if the Menu-Key is pressed.
    Kind regards,
    Andreas.
    Andreas

    Hi Andreas,
    Thanks for posting in MSDN forum.
    Yes, I can reproduce this issue on my side. After look into the afxdialogimpl.cpp and afxframeimpl.cpp file, It really is a issue in the dialog message translate. I have no workaround to avoid this. But maybe we can try to use
    CMenu class and handle WM_RBUTTONDOWN message instead of WM_CONTEXTMENU.
    void CMFCPopupMenuTestDlg::OnRButtonDown(UINT nFlags, CPoint point)
    // TODO: Add your message handler code here and/or call default
    CMenu menu;
    VERIFY(menu.LoadMenu(IDR_MENU1)); //IDR_MENU_POPUP是新建菜单ID
    CMenu* popup=menu.GetSubMenu(0);
    ClientToScreen(&point);
    popup->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y, this );
    CDialogEx::OnRButtonDown(nFlags, point);
    By using this, we can avoid the VK_APP message caused multi pop up menu.
    Also have you tried submit this issue to Microsoft connect?
    https://connect.microsoft.com/VisualStudio
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need to run program multiple times

    I need to be able to run my compiled java file five times all in the same cmd while only using one .java file... I got it to fully work when i only do it once, but how do i make it repeat everything five times?

    while (x=5)
    x=x+1
    allmycode
    }You are right: it's not a good idea to throw "allmycode" into a loop.
    so like in a while loop how it kind of "forgets" -or however you phrase it- all
    the ints/strings and just starts over with the same ones.This is a good description of what a method is (from a non OO point of view).
    It "forgets" its local variables.
    I agree with flounder, you should probably make a class for your data and a
    collection to store them in. But if this not where you are at the moment, you
    can still follow your intuition and make a method that processes the
    data line by line - effectively forgetting the work it did on the previous line.
    Such a method can be called weithin a simple for-loop.
    You example would look like this:import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    public class Adder {
        private static BufferedReader in = new BufferedReader(
                new InputStreamReader(System.in));
        private static String[] inputArr;
        public static void main(String[] args) {
            inputArr = new String[5];
                // First read the iput
            for(int i = 0; i < 5; ++i) {
                getInput(i);
                // Then process it
            for(int i = 0; i < 5; ++i) {
                processInput(i);
        private static void getInput(int line) {
            try {
                inputArr[line] = in.readLine();
            } catch(IOException ioe) {
                ioe.printStackTrace();
                System.exit(1);
        private static void processInput(int line) {
            String[] arr = inputArr[line].split(",");
            int first = Integer.parseInt(arr[0]);
            int second = Integer.parseInt(arr[1]);
            String unit = arr[2].equals("I") ? "Inches" : "CM";
            System.out.printf("%d %s%n", first + second, unit);
    }

  • I am having a big problem. I am not getting notifications from snapchat and only snapchat. I've made sure every notification setting was on and it just won't work. I have also restored my phone and deleted the app and re-downloaded it multiple times. Help

    I am having a big problem. I am not getting notifications from snapchat and only snapchat. I've made sure every notification setting was on and it just won't work. I have also restored my phone and deleted the app and re-downloaded it multiple times. It just wont give me my notifications. Help please.

    Go to Settings > Privacy > Location Services.
    Turn off SnapChat.
    Go to Settings > Notification Center
    Turn off SnapChat.
    Restart the device.
    Go to Settings > Privacy > Location Services.
    Turn on SnapChat.
    Go to Settings > Notification Center
    Turn on SnapChat.
    Test the issue.

  • Need to Restrict  the usage of same conditn type multiple times in same PO

    Dear All
    The system is allowing the usage of one condition type multiple times in the same PO line item.
    We want to put restriction in such a way that "one condition type if used should not be allowed to use again for that line item.
    Is there any solution for this through Configuration settings or we need to go for some enhancements?
    Please suggest me the enhancements available to achieve this requirement.
    Thanks & Regards
    Bala

    I think you have to make use of an exit (EXIT_SAPLMEKO_002)  or a BADI (ME_PO_PRICING_CUST)

  • TS1368 My child has put in the wrong password on my phone multiple times, my iPhone now says "iPhone is disabled connect to iTunes", But when I try to connect to iTunes on my laptop it says unable to connect due to a password is on the phone? What do I do

    My child has put in the wrong password on my phone multiple times, my iPhone now say "iPhone has been disabled connect to iTunes" When I hook my phone up to iTunes, iTunes then says that my iPhone can not be hooked up to iTunes because it has a password on it, but will not allow me to put in a password because the disabled message is still showing. What is the next step?

    You may need to put the iPhone into recovery mode : http://support.apple.com/kb/ht1808 - you should then be able to reset the phone and restore/resync your content to it.

  • I recently purchased some information to be downloaded to one of my apps I never received the download and I was charged multiple times I reported the problem my  Community

    I recently purchased some information to be downloaded to one of my apps I never received the download and I was charged multiple times I reported the problem And it's been about a week my question is how long does it take  to credit my account back. It's my money and I want it now.

    It can take a while for your money to show up in your bank, but a week is a bit over the top. Try contacting iTunes Store Support to make sure the refund was issued.

  • What is the  best money making java program?

    what is the best money making java program?
    any of them are in fact very "simple"? - say in fact can be develop by a middle- level programmer.

    public class MoneyMaker {
       public static void main(String[] args) {
          while (true) {
             System.out.println("+-----------------------------------------------+");
             System.out.println("| 10        RESERVE BANK OF INDIA \"93T 872468\"  |");
             System.out.println("|                                               |");
             System.out.println("|   ______                                   10 |");
             System.out.println("|  /      \\             __          ____        |");
             System.out.println("|  |      |        /|  /  \\        /  __\\       |");
             System.out.println("|  |      |         | |    |       0_o  \\\\      |");
             System.out.println("|  |      |         | |    |      /      ||     |");
             System.out.println("|  |      |         |  \\  /       `==    ||     |");
             System.out.println("|  |      |        ===  **         \\    /       |");
             System.out.println("|  |      |                        /\\--/        |");
             System.out.println("|  \\______/                       /______   /\\  |");
             System.out.println("|                                           \\/  |");
             System.out.println("| \"93T 872468\"                                  |");
             System.out.println("+-----------------------------------------------+");
             System.out.println("");
    }

  • Is it possible to automate the load of setup tables for LIS datasources?

    Hello,
    For LIS datasources, eg. 04 (shop floor control), once the production confirmation is done, we have to manually run the transaction OLI4BW to load the setup tables before extracting data to BW. Is there a way to automate the load of setup tables?
    Regards,
    Suraj

    Hi,
    Yes we can !
    Create variants for small ranges and scheduled all of them at a time. So that, loading will be completed soon.
    Thanks,
    Saru

  • Is it possible to automate the times that certain Mail accounts are online?

    I have two personal email accounts that I'd like to have active at all times, but I have a third email account that I only wish to be online/receiving emails during my usual business hours.  I know that I can select for individual accounts to be offline/online, but is it possible to automate this?

    randers4,
    THANKS!  But, I'm not using EXCHANGE.  My web site and e-mail are hosted on Google-based servers using POP3.
    Thanks!
    Rampager83

  • Possible? output a string from a java program into a running program

    I'm not sure if it is plausible, but this is my dilemma. My java program searches for street names in a specific region, then outputs the nearest street. I would like to synch this up with Google Earth, and output the street name into it, so it would go ahead and be able to search it right away. Is this possible, or should I attempt some other route?

    Check out my runCmd method. It gives an example of running another program and listening for the output. I built this to run javac and show the output in my custom editor.
    You'll see some classes in here that are not standard java classes, in particular InfoFetcher. Don't worry, this is just a utility I wrote for convenient handling of inputstreams. You can handle the inputstreams without it, but if you really want it, it's probably posted somewhere in these forums.
            private void runCmd(String cmd) {
                 try {
                      System.out.println("cmd: " + cmd);
                      Process p = Runtime.getRuntime().exec(cmd);
                      InputStream stream = p.getInputStream();
                      InputStream stream2 = p.getErrorStream();
                      InfoFetcher info = new InfoFetcher(stream, new byte[512], 500);
                      InputStreamListener l = new InputStreamListener() {
                           int currentLength = 0;
                           public void gotAll(InputStreamEvent ev) {}
                           public void gotMore(InputStreamEvent ev) {
                                String str = new String(ev.buffer, currentLength, ev.getBytesRetrieved());
                                currentLength = ev.getBytesRetrieved();
                                System.out.print(str);
                      info.addInputStreamListener(l);
                      Thread t = new Thread(info);
                      t.start();
                        InfoFetcher info2 = new InfoFetcher(stream2, new byte[512], 500);
                      InputStreamListener l2 = new InputStreamListener() {
                           int currentLength = 0;
                           public void gotAll(InputStreamEvent ev) {}
                           public void gotMore(InputStreamEvent ev) {
                                String str = new String(ev.buffer, currentLength, ev.getBytesRetrieved());
                                currentLength = ev.getBytesRetrieved();
                                System.out.print("(Error) " + str);
                      info2.addInputStreamListener(l2);
                      Thread t2 = new Thread(info2);
                      t2.start();
                 catch (IOException iox) {
                      iox.printStackTrace();
            }

  • Is it possible to trace the mouse event using java script in indesign cs3?-request urgent

    Hi friends,
    am writing js for indesign cs2, i want to know the things whether it is possible for tracing the curse position in indesign application using javascript? i need it to know for both cs2 and cs3
    thanks in advance
    by
    subha

    to Subha:
    I definitely do not know enough to answer your question.
    But on June 14, 2007, Dave Saunders started a topic
    (this forum) titled "Am I making progress".
    Posts 23 and 32 there could be helpful, but I may
    have misunderstood your phrase "tracing the
    cursor position".
    Roger Purves

Maybe you are looking for