Problem in stopping the process for a while

Hi all,
I am facing problem in stopping the process when i call *.exe from java. here i am explaning my problem in detail.
main(){
m1();
m2();
m1(){
Runtime r=Runtime.getRuntime();
Process p=r.exec("solve1.exe");
// this exe file will create a text file (temp.txt), and it is creating it with out any problem.
m2(){
using temp.txt here.
problem is when i call m1() it will create temp.txt , but by the time i call m2() temp.txt is saving into the disk and m2() is not able to find the file.
here what i need is there should be some time gap to before i call m2(); and i tried even with
p.waitfor(); in m1() -if i use this the program is not exiting out of runtime??
any one kindly hepl me
bye.

A test app(if you don't have sol, then pick another app)
public class WaitForTest{
    private WaitForTest(){
        try {
            Process p = Runtime.getRuntime().exec("sol.exe");
            System.out.println("Waiting....");
            p.waitFor();
            System.out.println("Done waiting") ;             
        catch(Exception e)
                e.printStackTrace();
        static public void main(String[] args){
            new WaitForTest();
}

Similar Messages

  • How to stop the process for some time

    I want to stop the process for some time can any one give the package or keyword or example for the same
    For suppose two programs A and B.. .B will run based on output of A. What i need is... When A is executed the process will stop for 5mins then B has to execute...

    You can use signals with DBMS_ALERT to "wake up" a procedure.
    Procedure A is something like this:
    DBMS_ALERT.REGISTER('B_FINISHED');
    do logic...
    when finished - send a signal
    DBMS_ALERT.SIGNAL('A_FINISHED','B you can start');
    now wait until B is finished
    DBMS_ALERT.WAITANY(...)
    continue logic hereAnd Procedure B is
    DBMS_ALERT.REGISTER('A_FINISHED');
    wait for a to finish
    DBMS_ALERT.WAITANY(...);
    do logic...
    when finished, signal A it can continue
    DBMS_ALERT.SIGNAL('B_FINISHED','A can continue');This is useful if u they need to wait for each other within the code. if they just need to wait - call B from A.
    Hope this helps.
    Edited by: Pyrocks on Nov 8, 2010 8:50 AM

  • How to stop the program for a while?

    Hi,
    I've created a small prog that the only thing it does is to ask for a given password before granting access to certain data. It works fine on the WTK emulator (from Sun of course), but it crashes on a Nokia 6600 due to a bug in the Nokia's MIDP2.0 implementation. Now I need to trace/find the exact point of the program where it crashes (in the mobile phone - where the app gets closed). MY PROBLEM is that I need to insert into the program some kinda code that stops for a while the program saying "I am at the Nth step and running fine", but I can't stop the program from executing, because I can't find out how, I've tried the
    display.setCurrent( someAlert );but it doesn't seem to stop the program like it would in an HTML JavaScript page. And:
    Thread.currentThread().sleep( 2000 );doesn't stop for some reason the program either..
    Can anyone give me a tip or a workaround of how I can temporarily stop the prog? Please help

    Try putting the current thread to sleep right after setting the alert:
    yourAlert.setTimeout(3000);
    display.setCurrent(yourAlert);
    try {
       Thread.sleep(3000);
    catch(...)

  • I use Adobe Acrobat Pro XI (11.0.08) When performing "Save as" "Reduced file size pdf" Adobe processes for a while then completely stops, and has to close down. Just started doing that today.

    I use Adobe Acrobat Pro XI (11.0.08) When performing "Save as" "Reduced file size pdf" Adobe processes for a while then completely stops, and has to close down. Just started doing that today.

    I have Windows 8.1, and when I right click on the Windows flag (bottom left), the menu gives me a "Search" option. When I enter "%temp%", it goes to " "my username"/ appdata/temp" which is a list of file 1718 file folders. Many are empty but I did a small sample. Is that the right place to delete?    I tried Windows- Disk Clean, but that did not help.

  • When starting to install they stop the process and say encountered many problems try re installing

    When starting to install they stop the process and say "encountered many problems try re installing" and system not modified

    Try this:
    1. Boot from your Panther Installer Disk. After the installer loads select Disk Utility from the Installer menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Set the number of partitions from the dropdown menu (use 1 partition unless you wish to make more.) Set the format type to Mac OS Extended (Journaled, if supported.) Click on the Partition button and wait until the volume(s) mount on the Desktop.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled, if supported.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process will take 30 minutes to an hour or more depending upon the drive size.
    7. Once the formatting has completed quit DU to return to the installer. Proceed with the installation of Panther.

  • I had some problems with my pc, since then when I close Firefox it won't reopen unless i go to Task manager and end the process for FF.

    I had some problems with my pc, since then when I close Firefox it won't reopen unless i go to Task manager and end the process for FF. I have uninstalled FF and re-installed it and no change.
    Walt

    See "Hang at exit":
    * http://kb.mozillazine.org/Firefox_hangs
    * [[Firefox hangs]]

  • HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING IN THE PRODUCTION?

    HI ALL,
    CAN ANYONE TELL ME HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING DAILY AT 5.00 PM. I NEED TO STOP THE PROCESS CHAIN FOR COUPLE OF DAYS AND THEN RESTART IT AGAIN.
    cAN ANYONE TELL ME THE PROCEDURE TO STOP THE ENTIRE PROCESS CHAIN RUNNING IN THE PRODUCTION.
    THANKS
    HARITHA

    Hi,
    First and foremost let me advice you to be very careful while doing this.
    For Rescheduling
    RSPC> chain > Goto > Planning view and
    click on Execution tab > select > Remove from Schedule and then in Maintain variant of start process reschedule for the day you require it to run.
    For terminating active chain
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Re: Kill a Job
    Re: Killing a process chain.
    Regards,
    JituK

  • HELP - Receiving error message "The file has not been processed. An error has occurred which stopped the processing of the PDF"

    Have been using Adobe CreatePDF for many months successfully.
    Only recently over the past few days I have been experiencing errors for periods between 3-5 hours on every attempt to convert/combine files. The error reads: "The file has not been processed. An error has occurred which stopped the processing of the PDF"
    It will stay like this and no amount of refreshing the cache, logging in and out will help. I'm running Firefox 34.0.5, windows 7 64bit. Only solution I've found is to wait until the next day and it seems to be working again. Only explanation i can think of is some unexplained maintenance adobe is running behind the scenes because I'm often working late between 12am - 4am.
    When this problem happens, no file types will convert/combine I've tested JPEG, PDF and word docs to PDF.
    I log in and out of my account, I've cleared my cache, I'm using Firefox 34.0.5 which has always worked in the past I just don't understand how this error is happening for such long periods. Starting to reconsider this product when there are free alternatives to simply combine my PDF docs! please help.
    Tom.

    I am still experiencing this problem. Customer service from Adobe has been abysmal!
    I called Adobe tech support at 2am Australian time ( >1 weeks ago) and got onto a help centre in India. I was walked through all the troubleshooting steps and they remotely accessed my PC and confirmed that It was not my PC that was at fault. They reset my password and dialed into my adobe account from their end to attempt a simple conversion and export to PDF which failed. I was told that this problem is not something they can fix, and is a result of something on the back end of their software.
    They advised me that the problem would be passed to a fixed within 12 hours and they would call and email me to confirm everything was OK. I gave my phone number with (area and country code) my email but have not had any communication back.
    I am extremely dissatisfied, and just want this software to function. Is that too much to ask?
    Note: This problem is happening always now, regardless of time being used.
    Tom

  • How to Stop the process chain if it in the middle of the process?

    Hi,
    Is there anyway that i can stop the process chain if it is in the middle of the process already?
    Raj

    "Hi,
    First and foremost let me advice you to be very careful while doing this.
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Different Ways to stop process chain
    1)SM37 -->Kill Job
    2)SM50/sm66- ->Kill process
    3)RSPC>Job Log>Make the process RED forecefully.
    4)RSPC>Process chain> main Menu"Remove from Scheduling" OR
    5)se37-->RSPC_API_CHAIN_INTERRUPT
    give RFC BW system name(technical) and process chain name(technical)
    Steps 1 -3 stops the chain running in process
    Steps 4-5 stops the chain AFTER the current job which is running is completed as sucessful or Failure by nature.
    Rationale - 4-5
    This function will only remove the jobs from schedule, which did not yet run. It will not kill running jobs, as this may leave the system in an inconsistent state, moreover killing processes is possible for synchronous processes only anyhow. This means, that there will be no errors with interrupted chains, which on the other
    hand means an interrupted chain is not restartable. So for a running chain this function is intended to be an emergency break only. You can use it, however, to remove a scheduled chain from schedule, such that it does not start except by your product.
    Re: Kill a Job
    Re: Killing a process chain.
    How to stop a process in a process chain?
    Regards,
    JituK

  • My sound keeps scrambling and blaring without warning before I either restart or stop music/videos for a while. It's without warning and happening on different programs. Is this happening to anyone else?

    My sound keeps scrambling and blaring without warning before I either restart or stop music/videos for a while. It's without warning and happening on different programs. Is this happening to anyone else?
    I thought about resetting the nvram/pram, but before I do that, I wanted to check here. It might not be the issue. My startup looks fine and the sound is great up until the discrete moment when it's suddenly scrambled and nonsense.

    I did try a safe boot once before, which didn't stop the occurrences. I can try it again to make sure, and see if the problem stops happening.
    Never installed extra audio or plug-ins, though.
    It happened just once not long after I bought the mid-2013 MBA, which I think came with 10.8.4, but I assumed the noise was because I was moving the computer around on a surface that created static, since the noise stopped after I picked it up off the surface. However, that must have just been a coincidence, because it happens more frequently now without moving or touching anything.
    Trying the safe-mode boot and restart, and testing it out for day or so to see if it happens again.

  • I have an iMac 5.1 which is running OSx10.5.8 - it runs very slowly and I can't find if there is a particular problem. In the process, I have tried to install 10.6 [I have a new iMac] and the 5.1 won't accept the install discs.

    I have an iMac 5.1 which is running OSx10.5.8 - it runs very slowly and I can't find if there is a particular problem. In the process, I have tried to install 10.6 [I have a new iMac] and the 5.1 won't accept the install discs.

    As you have discovered... you cannot use the install discs from another Mac...
    Re the iMac running OS X 10 5 8... and for your New Mac...
    See Here for keeping your Mac Happy...
    http://support.apple.com/kb/HT1147
    http://www.thexlab.com/faqs/maintainingmacosx.html
    http://www.thexlab.com/faqs/performance.html

  • How to stop the process chain showing status as yellow but no process step

    Dear Friends,
    How to stop the process chain showing status as yellow but no process step is running in that process chain.
    We have manually triggered the process chain for sales it finished successfully till load data but the next step is create index and DB statistics. Both of this steps are in unscheduled position only and no background job for this.
    Please guide me.
    Thanking you in advance.
    Regards,
    Shubhangi

    Hi,
      At times even I have faced this situation.  During those times, running the Function module RSPC_PROCESS_FINISH by passing the right parameters came to my rescue.
    Regards,
    Raj

  • Unable to open PS Elements 11 once closed without Stopping the process in Task Manager

    Photoshop Elements 11 will not open once closed unless I either stop the Process in Task Manager or reboot the computer.  I have tried setting the program to run in Administrator mode but this did not work. I am running the program on a 64 bit Windows 7 laptop, the process I need to close each time is usually "Photoshop Elements Editor exe*32'?"
    Can anyone help me please?

    I have this problem intermittantly with Premiere Pro and have not been able to find a solution.

  • How to Stop The Process of oRecordSet.DoQuery()

    Hi all..
    I would like to ask 1 question.
    When program is executing the query passed as a parameter to oRecordSet.DoQuery(), is there any way we can stop the process by clicking on cancel button or other events?
    thx.
    regards'
    erwine

    Hi all..
    thx for your quick replies.
    Coz currently im doing SDK module which requires to process alot of data..and the process of inserting and updating to DB is kinda complicated. So basically, i use transaction to start and when i encounter error, i will rollback.
    Let's say if client run the program and suddenly realized that he/she gives wrong input and wants to cancel the whole process.What can i do? Client may say that button 'Cancel' is actually quite confusing because cancel is self-explanatory term to cancel process, but in SAP BO, it's actually to quit the form.
    I once thought of using thread, however, the event to trigger thread to stop will have to wait until the process done. so it's quite complicated

  • Problem to repatraite the items for shopping cart status Held

    Hello all experts,
    In a scenario standalone I have a problem to repatriate the items for my shopping cart that have a status held.
    I verify the data of item and catalog we don't have a difference for pricing product etc ......
    If I repatriate item I see never data for my new shopping cart.
    For other informations status for item is To be Processed.¨
    Please help for this problem for all experts.

    Hello Steve,
    To remove action from specific workitems, you can do this in the UWL  configuration file.
    1) Download the configuration file (in ZIP format). Go to:
    System Administration > System Configuration > Universal Worklist & Workflow > Universal Worklist Administration
    Click to "Administrate Item Types and View definition".
    Then download file 'com.sap.pct.srm.core'.
    2) Navigate to each WI you would like to change:
    - <ItemType name="uwl.task.webflow.srm.TS40007952"... (SC Completion)
    - <ItemType name="uwl.task.webflow.srm.TS40007953"... (SC Approval)
    - <ItemType name="uwl.task.webflow.srm.TS40007954"... (SC Approval)
    3) Within those item types, put a new property to action reference "reject" for 'Actions' definition like below:
    <Properties>
       <Property name="display_order_priority" value="uwlExcludeFromPreviewDetail" />
    </Properties>
    4) Save and upload file again.
    Regards.
    Laurent.

Maybe you are looking for

  • How do I put two centered text in a PAGE_START in BorderLayout ?

    Hi everybody. I am using a BorderLayout and in PAGE_START section I want to put a title(centered, with two rows). I don't know how to do that. When I put my text there, is on the left side. Thanks. Edited by: blackblack13 on Jul 18, 2009 1:08 AM

  • Elements 8 Crash on Exit in Windows 7

    Hi, I am deploying Photoshop Elements 8 to Windows 7 computers in our organization.  When exiting Elements 8 Editor, we get a crash report every time.  This is happening on multiple different models of systems on a clean Windows 7 base Image.  I have

  • Account key and Accural G/L account

    Hi, For a freight condition we have assigned FRE as the account key and FR1 as the accrual. For the both the keys we have assigned GL accounts. FRE-506000ACCT KEY FR1 131100ACCRUAL Postings: 1) AFTER GRN - The accural key gets hit 243000        Mater

  • CRM LEAD STATUS CHANGE : BAPI_LEAD_CHANGEMULTI

    Hi everyone, I see that you were able to change status via BAPI_LEAD_CHANGEMULTI. I am currently using CRM 4.0 trying to do the same thing; but unsuccessfully. Any help in this matter will be greatly appreciated. I undated statusx-status = 'X', fille

  • Html check box won't reset...Captivate 4

    I seem to have a problem getting the html check box to function after publishing. When I attempt to publish a title again under a different name the html check box is grayed out. It seems the html function is only available the first time you publish