How to stop a thread without the deprecated Thread.stop() method?

Hi,
I am writting a server application that launches threads, but the run() implementation of these threads are not written by me (i.e. i have no control over them): they are third-party programs. That's why i could not use the well known Java tutorial way to stop a thread (i.e. with a global variable that indicates the thread state).
I would like my server to be able to stop these threads at any time, but without using the deprecated Thread.stop() method.
Any ideas ?
Thanks in advance,
Fabien

Thanks Pandava!
I was arrived at the same conclusion... As to me, it is a very bad issue, because it means for example that a servlet server can not stop any servlet it launches (especially for preventing infinite loops).
If i want to be strictly JDK 1.4 compliant, i should not use Thread.stop(). But if i don't use it, i don't have any ideas of how stop a thread that i don't control...

Similar Messages

  • When I share a pages document as a PDF (via e-mail) all the pictures change from the original document, most are missing with just a few of them repeated in the spots where others had been.  How do I do this without the document changing?

    When I share a pages document as a PDF (via e-mail) all the pictures change from the original document, most are missing with just a few of them repeated in the spots where others had been.  How do I do this without the document changing?
    I need to be able to send it to a PC in order to print it.

    Hard to say what is happening without examining the file.
    If you like click on my blue name and email me both the .pages file and the the .pdf you have made from it.
    Peter
    ps It would help to say what version of Pages you are using and on what you are running it. iOS or Mac and what version.

  • My kids desabled my mini ipad after several tries to log in.  My computer that I used to sincronize it doesn't work anymore and i can't connected to itunes.. How can i restart it without the actual computer that I used before??

    My kids desabled my mini ipad after several tries to log in.  My computer that I used to sincronize it doesn't work anymore and i can't connected to itunes.. How can i restart it without the actual computer that I used before??

    You can use any computer but your data will be lost if you have no backup.

  • My iPod touch isn't being recognized by my pc. The lock button on it won't work due to water damage, and a friend of mine fixed the problem by restoring it on his computer. How do I restore it without the lock button?

    My iPod touch isn't being recognized by my pc. The lock button on it won't work due to water damage, and a friend of mine fixed the problem by restoring it on his computer. How do I restore it without the lock button?

    first try:
    iOS: Device not recognized in iTunes for Windows
    next
    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • How to Install Windows 7 Without the Disc

    1a)  Here is very useful article from PCWorld.com. The article is entitled "How to Install Windows 7 Without the Disc" and means just what it says. The article also has links to Magical Jelly Bean Keyfinder and legitimate Windows 7 ISOs from Digital River, a licensed distributor of Microsoft software. The article lists "Step 1" as;
    "Find your Windows 7 product key: Typically this 25-character alphanumeric string is printed on a sticker affixed to your PC or on documentation included with your PC. Alternatively, you can use a keyfinder program such as Magical Jelly Bean Keyfinder to pull your product key from the Registry. You need your product key to reinstall Windows."
    1b)  Using a key finder, however, is only useful if the Windows 7 product key was printed on a sticker (Microsoft Certificate of Authenticity) affixed to your PC, on documentation included with your PC, or sent via email by Microsoft. Assuming your computer came from one of the big brand computer manufacturers... HP, Sony, Dell, Gateway, etc... as most do, it uses a generic "mass activation" OEM SLP key. Trying to use this key by itself isn't going to work. This OEM SLP key needs to be mated with an OEM SLP certificate and an appropriate OEM BIOS with a proper SLIC table.
    1c)  Here is where ABR Beta With Windows 7 Support comes to the rescue. Follow the "How to use it" section of ABR for Windows Vista for information and instructions on how to use ABR. The steps listed for Vista apply to Windows 7 as well. Perform the "activation backup" to "backup" and save the OEM SLP key and OEM SLP certificate. Save the entire ABR folder to an external location for later use. This will allow you to pre-activate your "clean" Windows 7 install on the computer you pulled the key and certificate from.
    1d)  Now install Windows 7 from your new "Windows 7" disc or USB stick, following all prompts as needed. Don't enter a Windows 7 product key if request. Also, don't allow Windows to try to auto-activate. Once Windows is fully installed, run ABR "activation restore" to "restore" the previously backed up product key and certificate to the new Windows 7 install. Verify that Windows is activated, repeat "activation restore" if needed.
    2)  Here is another useful article, this time from SevenForums.com. This arcticle is entitled "Clean Reinstall - Factory OEM Windows 7" and provides detailed steps required to backup your computer, audit current hardware and software, locate software and drivers, install and activate Windows 7, and create a Windows 7 Backup Image of your fresh install.
    Good luck.
    Links to additional Windows 7 SP1 "Editions" and "Languages" can be found HERE and HERE.
    Link to "ei.cfg Removal Utility". The "ei.cfg Removal Utility" is a simple tool that will remove the ei.cfg  from any Windows ISO disc image, thereby converting the image into a "universal disc" that will prompt the user to select an edition during setup instead of being forced to use different discs for different versions of Windows 7.
    Direct link to Windows 7 USB/DVD Download tool.
    <Cross posted to Notebook Operating Systems and Software for Notebook, Laptop, and Netbook users>
    EDITED by Frank on 8/28/2013
    Please click the white KUDOS star to show your appreciation
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

    ervis,
    Before formatting the hard drive you should have been able to use the HP Recovery Manager to create your recovery discs or perform a system recovery. This is provided the recovery partition wasn't already corrupt or damaged. If the "D:" HP Recovery partition is missing or damaged and you don't have a set of HP Recovery Discs, you will need to use the information in my previous post to get your computer up and running again.
    The information in the document referred you to applies to several different "types" of installations;
    Using ABRbeta is only needed if you have an active OEM factory SLP (system locked preactivated) installation of Windows. You use ABR to pull the factory key and certificate off the computer, to reuse it on the same computer with a clean Windows install.
    If you are just installing Windows and are going to use the Windows 7 product key on the COA on the side of your computer, all you need to do is download the same version of Windows that your key is for and burn the ISO. Now install Windows answering or following all prompts as needed (except do not enter the Windows product at this time... it will be entered later). Once Windows has completely installed, enter the key and activate it. Your Windows 7 OA key should work on a SP1 install without issue.
    The only thing I see that could mess things up, is the language of the install. If you are still having trouble activating Windows, please reference the ISO you download and a post a photo of your Windows COA
    with the key erased or Xed out.
    Please send KUDOs
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • HT201304 How do I install apps without the  app store

    How do I install apps without the  app store

    This is an issue not to be taken lightly. I just upgraded to Mavericks. My two favorite amateur radio apps will not launch because they did not come from the App Store. There must be a way to make them work. Come on, let's have it. Ohh, the apps: DVTool for DStar Radio operation, and echomac for amateur radio repeater connection from a Mac. These are essential amateur radio applications used in emergency radio communications ... ARES.

  • How to track my ipod without the serial number, how to track my ipod without the serial number

    i just got my ipod stolen how do i track it without the serial number please help my parents will kill me

    The serial number does not help you track it. You can't track it without Find my iPod. If you did have Find my iPod, I have no doubt the thief disabled it by now. So it's gone.

  • How do install osx software without the software

    How do I install osx without the software

    You need to provide more info about teh situation. Mac's have an internet recovery and that is why they don't ship with DVDs anymore. Hold command+r during boot to access internet recovery.

  • HT1414 itunes is requesting for a password to restore backup but it is not accepting any of my iphone passwords. what password does it require? If i cannot remember this then how do i continue backup without the password request?

    I am using iphone 4 and just updated the software on my mac but wanted to restore my calender/contacts/messages after backup. itunes is requesting for a password to restore backup but it is not accepting any of my iphone passwords. what password does it require? If i cannot remember this then how do i continue backup without the password request?

    If you have a corporate Exchange account set up on the phone, the administrators can require encrypted backups. Try using your Exchange password.

  • Why are two pages yoked when I prepare a newsletter in Pages?  How can I delete one without the other?

    Why are two pages yoked when I prepare a newletter?  How do I delete one without the other?

    They are all part of one Section. Just as you do not (hopefully) rip pages out at random from books, the pages of a Section are linked by the text that flows from one to the other.
    If you want to move or delete particular page/s Insert a Section Break at the end of the page before.
    Peter

  • I'm new to FCPx - How do I export this without the compressor?

    I'm new to FCPx - finished editing 1 min ad & FCPx insists that I buy 'compressor' to create file of video. 
    How do I export this without the compressor?

    Insists? How does it do that? Do you hear a voice? See a dialog? Get switched to the App Store?

  • Need help ...just bought a mac mini, how to install adobe lightroom4 without the cd-rom?

    need help ...just bought a mac mini, how to install adobe lightroom4 without the cd-rom?

    You could download it as a trial version, and enter your serial number when prompted to buy.
    https://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_lightroom

  • HT5312 I've forgotten the security questions. It made me to cannot purchase app. How can I buy it without the security questions?

    I've forgotten the security questions. It made me to cannot purchase the general app. How can I buy it without the security questions? Please.

    You will have to reset the security questions with new ones.   See this document ...
    Rescue email address and how to reset Apple ID security questions

  • I downloaded some apps for my ipho in the apptrackr site, the apps are shown in my itunes library but when i try to sync those apps at first it works and then it says an error occur (0xE8008001). How can I sync them without the error?

    I downloaded some apps for my ipho in the apptrackr site, the apps are shown in my itunes library but when i try to sync those apps at first it works and then it says an error occured (0xE8008001). How can I sync them without the error?

    If your phone is jailbroken, we can't help you, as already stated.
    If you're new to this and you're trying to download apps to put on your phone and it is NOT jailbroken, you can't do that.
    You must go through the iTunes app store.

  • How to reset a macbook without the cd ?

    I have a macbook (2009) and I need to reset it all to sell it. How can I do it without the apple CD ? thanks.

    Unless it originally shipped with Lion, that's not possible without purchasing a Mac OS X 10.6 DVD(which won't install iLife) or phoning Apple Support and ordering replacements.
    (68041)

Maybe you are looking for