DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004

    Confused:About JAVA Multi-threading Programming

    Recently, I'am working on multi-threading programming,However I encounter the following trouble.
    On one hand,I make the program to run a dead loop.On the other hand, I try to perform another operation(such as open a dialogue).Sometimes,this might cause programe collapsed,followed by lots of exceptions.I don't know how to solve this problem, so I need your help.
    Any help would be appreciated.

  2. #2
    Join Date
    Feb 2004
    We'll need to see your code first, threads aren't the easiest of things to run through in your head because they don't run things in any particular sequence. Its possible to run the same threaded program through two different times and have it work once and not the other time if you're not careful with the programming.

  3. #3
    Join Date
    Jul 2004
    Firstly, if your application is throwing unhandeled exceptions, it means that you havenīt put every method that throws an exception, in a try-catch block.
    Try doing this and then you can make a custom System.out.printl("") in each catch block so you can find out where you are going wrong.
    I use this as the easiest way to find out where my application is "crashing".
    I may be wrong on this but I always program this way and it works for me.
    Good luck.
    I think, therefore I am....... I think.

  4. #4
    Join Date
    Feb 2004
    What exceptions are being thrown? Do these exceptions only get thrown sometimes, or does it happen everytime? The exceptions will give you a line reference in your code when they dump the stack trace to the console, so if you find the first reference to one of the classes you wrote you'll see (hopefully) what is causing your problem. It may be the case that the problem only manifests itself at this point however, and the actual root of it is somewhere else. If you post your code and the exceptions we'll see what we can do

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.