How many times can i call the start()

Hi All:
I would like to know how many time you can actually call the start(),
cuz my app is doing some really strange things,
here is a fragament of my code:
private void spawnThreads()
ListIterator it = _vWorker.listIterator();
while ( it.hasNext() ) {
ClientWorker client_worker = (ClientWorker) it.next();
client_worker.start();
ClientWorker is another Thread, and in the run() of the ClientWorker, I have
public void run() {
Runtime rt = Runtime.getRuntime();
     try {
     // Start the timer
     Process child = rt.exec(_fileName);
     // gobble any error or output streams
StreamGobbler errorGobbler = new
StreamGobbler(child.getErrorStream(), "ERROR");
StreamGobbler outputGobbler = new
StreamGobbler(child.getInputStream(), "OUTPUT");
errorGobbler.start();
outputGobbler.start();
child.waitFor();
                                        } catch (IOException e) {
               System.err.println("IOException starting process!");
          } catch (InterruptedException e) {
               System.err.println("Interrupted waiting for process!");
I have a couple of cmd files to execute, so This spawnThreads() will be called a couple of times,and the funny thing is , it will execute the first cmd files, and that is it, it won't execute the 2nd or the 3rd cmd files, it will start the thread, but then the run()won't actually gets invoked,,,so I am just wondering if anyone of you has encountered this problem, perhaps you could lend me some insight on this?
thanks,

Yes, you can run the start() of a Thread more than once,
here is my Test App,
public static void main(String[] args) throws Exception {
Vector vec = new Vector();
for (int i=0;i<4;i++){
ClientThread ct = new ClientThread();
vec.add(ct);
ListIterator it = vec.listIterator();
while(it.hasNext()){
ClientThread ct = (ClientThread)it.next();
ct.start();
and as you have already guessed it the run() of ClientThread simply does system.out.println()
and here is the output
run started
run started
run started
run started
so..yeah..I don't really have any idea what is happening to my app and why it is not executing any cmd files after executing the very first cmd file

Similar Messages

  • HT204370 How many times can I watch the movie I just downloaded?

    How many times can I watch the movie I just downloaded?

    You can watch it as many times as you like, there is no limit. If you take a backup of it (even if you are in a country where films can be re-downloaded for free, there is no guarantee that they will remain in the store for future re-downloading) then you will be able to continue watching it for years to come.
    Film rentals are different, in that when you start watching it you have 24 hours if you are in the US, 48 hours elsewhere, before it expires - but during that time you can watch it as many times as you like.

  • How many times can you attempt the restrictions passcode?

    I've forgotten the restrictions passcode I set on my iPod. Since I don't want to perform a complete systems reset just yet, I want to try to attempt remembering my passcode... how many times can I try the restrictions passcode without permanently locking it?

    This is for the restrictions passcode correct? Not the regular passcode....
    And I heard somewhere that if you guess too many times, you will be permanently locked out of your device...

  • How many times can you use the serial number to download the cd

    help how many times can we use the serial number to download the cd photoshop elements 11

    Download Photoshop Elements products | 13, 12, 11, 10
    Mylenium

  • How many times can you enter the wrong pin code on an iphone before it resets?

    How many times can you enter the wrong pin code on an iphone before it resets itself?

    Hey Robin.T,
    Thanks for the question. The following article provides the answer to your question:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/HT1212
    If you enter the wrong passcode six or more times, you'll see a message that says one of the following:
    iPhone is disabled
    iPad is disabled
    iPod touch is disabled
    You can also set your passcode lock to wipe the device after 10 unsuccessful attempts (Settings > General > Passcode Lock > Erase Data)
    Thanks,
    Matt M.

  • How many times can I attempt the passcode before I can't enter it any longer...it has been over 3 hours and it will not let me re-enter it?

    How many times can I attempt the passcode before I can't enter it any longer...it has been over 3 hours and it will not let me re-enter it?  My daughter forgot the new code she put in....

    What dowes the screen say? If it just say disable and gives not time to retry then you have to restore the iPod
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How many times can i use the limited warranty on my Apple iPhone 5, I just broke mine after getting a brand new one. Also, can I extend my warranty?

    How many times can i use the limited warranty on my Apple iPhone 5, I just broke mine after getting a brand new one. Also, can I extend my warranty?

    If you purchased AppleCare + within 30 days of getting your iPhone 5 you are allowed 2 instances of breakage replacement with a $49 deductible. If you do not have AppleCare + accidental breakage is not covered under you warranty, you can do an out-of-warranty replacement for $229.

  • How Many Times Can I Use The Same Serial Number For Adobe Creative Suite 4?

    I have design standard and was told I can use the same serial number on multiple computers. How many time can I use it? And say I install it on the maximum number of computers, but get a new computer, can I uninstall it on one of the old computers and use it on the new one? And can I use the programs on both computers simultaneously or do I have to use them one at a time?

    Fred Tech wrote:
    Broadly speaking, it depends on the type of license you have.
    Specifically, if you have a single license then officially, you should only install it once on one computer.
    Practically, (unless it has changed with CS4) you maybe able to install it on more then one computer, BUT can only run one instance of the software at a time. You can not run more then one instance of the software concurrently; i.e. you can't run Dreamweaver on Computer 1 and Photoshop on Computer 2. That would be two instances, and is not permitted.
    This is my understanding. I am happy to be corrected if I am wrong
    Fred
    Sorry Fred you are wrong.
    If you have a single license you can install it on as many computers as you like. you can only activate the suite on two computers at anyone time. Work and Home or as many of us do it Desktop and Laptop. You can not use the computers simultaneously. You only have 20 activation/deactivations so use them wisely. Student versions only have one activation. You can not break up the suite installs the suite is considered one application.

  • How many times can I enter the wrong password restriction?

    I set restrictions on my iphone to disable some apps and save battery. Unfortunately i set it a year ago and I've used it forgotten the password and now I cannot remember it.
    I tried to type the password but i did twice failed passcode, i wonder how many time i can enter the failed passcodes before my iphone will be locked forever.
    Please help me
    THANK YOU!

    7,635,982,358.
    If you've forgotten the password, the number of times that the device will accept an invalid password is irrelevant.
    Do as the manual says, restore the device using the computer it normally syncs with and restore as new.  Restoring from backup will not remove the restrictions passcode.

  • Movie rental Q: How many times can you watch the film within 48 hours?

    It's just I have 8 hours left on Into The Wild and I fancied watching it a second time, only it is not playing when I click on the thumbnail. It just says "accessing the iTunes store" for a few seconds. I've tried clicking play. Other films appear to work ok, just not this one. I assume that if it doesn't let me watch it a second time iTunes will give me free movie rental credit.

    According to the FAQ "Once you've started to watch the movie, you have 24 hours to finish watching the movie (even if you start watching before the download is complete). You can watch the movie as many times as you want within this 24-hour period": iTunes Store movie rental usage
    If you are having problems you should contact iTunes Store Customer Services.

  • How many times can i download the app that i bought in Mac app store

    Is it the same as Iphone app store's case?

    yes the same, so as many times as you want and on as many mac desktop and notebooks that you own.
    By own means, you can do it on all the systems which are registered with the same Apple ID with which the App was purchased

  • How many times can you change the region of the computer

    i need to know. is there a limit?

    That's not what the above KB article says but I've never tried it.
    This is what is states:
    In Mac OS X, this dialog box appears the first time a DVD disc is inserted:
    "Since this is the first use of a DVD disc, the drive region code must be initialized before playing.
    "New Drive Setting: Region Code 1
    "You can only change the drive region code 5 more times."
    As I read that, once you set the region code, there are five additional changes permitted. As I said I haven't tried it and I'm not about to.

  • How many times can I install the same song on a different PC

    I had one PC where i kept all my iTunes songs. I also made a backup from all of these songs on a external hard disk. I had big problems with my PC and I had to reinstall Itunes and import all the songs again (from my backup on the external hard disk). When I want to play some songs I receive a message telling me I installed that song for the 5 th time on a different PC and that it will be the last time I can do that. How is this possible? I only installed it on 1 PC ????

    If your system crashes or you reinstall your operating system without deauthorising iTunes first, even a single computer can use up your limit of 5 authorisations. If you've reached your limit of 5 you have the option once a year to deauthorise them all in one go and start over again: About iTunes Music Store Authorisation and Deauthorisation
    See also this article: One computer using multiple iTunes Music Store authorizations

  • How many times can you reset the Region?

    A few minutes ago, I put a DVD into my MacBook for the first time.
    It was a Region 1 disc, and immediately Apple's DVD player opened and began playing the disc. I was rather surprised, because the first time I inserted a DVD into my Mac Mini, Apple's DVD player opened, but informed me that the region must first be set before I could play a disc.
    (I know that the system preferences can be set so the machine "does nothing" when a DVD is inserted. It isn't the fact that the DVD player opened that surprised me--it's the fact that I wasn't given a region-setting warning before the DVD began playing for the first time.)
    I then stopped the DVD player, ejected the disc and inserted a Region 2 disc. Again, Apple's DVD player opened, and when I hit the play button, I received the notice that the drive's region was set for 1 and would have to be changed to play the Region 2 disc.
    However, what was strange is that the message indicated that I only had 4 region changes remaining.
    I always thought we were allowed 5 region changes.
    Am I wrong, or is it possible that the region setting on my MacBook had already been set (and perhaps even reset) before I purchased it?

    I encountered the same thing when I played a DVD in my MacBook for the first time, I had assumed it would ask me as my other Macs had done. However, it appears that since Panther, an administrative user does not get asked this question. The following is from the Info Article on DVD Regions
    "In Mac OS X 10.3 Panther and later, users with administrative privileges aren't prompted to change the region the very first time a DVD-Video disc of a single region is inserted. Instead, the region of the DVD drive is automatically set to the region of the DVD disc that was inserted."
    The article also indicates that 5 changes is the standard, so if you were logged in under an admin account it automatically set the first one for you.
    MacBook, Intel Mini Duo, Dual G5, iMac FP800   Mac OS X (10.4.6)  

  • HT1414 How many times can you attempt the restrictions passcode?

    I forgot the restriction code, I already tryed 9 times and the TIME you have to wait after the fifth try is increased like crazzy.

    That is a security measure. If the device is being tampered with, the longer the "tamperer" has to wait, the more likely they are to become discouraged and give up.
    I think that you get 10 attempts, but I can't swear to that having never been in that position. In any event, you will probably have to restore to factory settings if you want to be able to use the iPad again. You cannot restore from a backup - unless that backup does not have the restrictions passcode in it. If it does not have the passcode in it, then restoring from that backup will eliminate the passcode.
    If you have to restore, you have to use iTunes on a computer, since you cannot get into the settings.

Maybe you are looking for

  • Error during currency conversion and consistency check in a sales order

    Hi Experts, I am facing the below error in the sales order. The sales order is having so many items. The below error is coming for few items only. I have checked the currency exchange rates also. All are maintained properly. Please advice me how to f

  • Auto mount SD Flash

    Hi, everybody! Help to solve a problem. On my MBA of all 128Gb disk space. I installed in cards reader flash card on 64Gb. If I close/switch off/discharge battery, after the flash card isn't available, it is necessary to pull out and insert still aga

  • Maintain tax rate for excise duty

    Hi, Where do to maitain the tax rate for Excise duty? Say for example for Excise duty for 2009. Regards, Vidya

  • Full Backup Prior to Installing New RAM

    Vet my plan, please! I have a 4g USB drive and plan to do a full system backup prior to installing 2/2 gig memory sticks (obviously have to remove original memory, as there are only 2 slots avail.). Other than shutting the system down and removing al

  • Error 3002, updating to ios 5 help

    Hey, one of my friends registered my udid to his apple developer account. I got the ios 5 firmware, but whenever i try updating, i always get an error 3002.  I'm sure that if i wasn't registered, it would say that i would need to register. I'm also u