How to find out if a thread has finished execution?

Hi, Am new to multi-threaded programming. I have a question: I start a new thread from the main thread. This new thread has to update a swing component & thats it. How do I know when the new thread has finished its execution? Also, I need to kill the thread once it finishes its execution?..or will Java's GC take care of it? If I need to kill it from the code, how do I do it? I see that the destry() method of Thread class is deprecated.
Thanks.

boolean isAlive()
Also, I need to kill the thread once it finishes its execution?..No
or will Java's GC take care of it? Yes
You can do Thread.join.
See the API docs and/or a threads primer.

Similar Messages

  • How to find out the JVM thread that is consuming high CPU

    I am using WL 10.3, JRockit JVM on Linux. I have taken thread dumps. How to find out the JVM thread that is consuming high CPU?
    I know how to map it Sun JVM on Solaris. I haven't done in on JRockit so far. Please advise.

    Check out some of Marcus Hirt's blog entries for details about how to use JRockit Mission Control. It's a very nice tool that should provide a lot of insight:
    http://blogs.oracle.com/hirt/

  • How to find out if your Mac has the new Virus ?

    How to find out if your Mac has the new Virus, and how to fix it ???

    Helpful Links Regarding Flashback Trojan
    A link to a great User Tip about the trojan: Flashback Trojan User Tip
    A related link in the tip to a checker: Malware Checker Dowload Link
    A Google search can reveal a variety of alternatives on how the remove the trojan should your computer get infected. This can get you started.
    For now I recommend the User Tip from etressoft to detect and remove:
    Checking for and removing the "Flashback" trojan
    Kaspersky Flashback Trojan Site:Flashback Trojan Detection and Removal
    Also see Apple's article About Flashback malware.

  • How to find out the user who has created  a new field in the custom table.

    How to find out the user details who has created  a new field in the custom table.
    Thanks,
    Joan

    Hi Jesudasan ,
    You can know the user details with version management.Please find the
    below procedure to know.
    Go to table->Utilities tab->version->Version management->Compare the previous one .
    Hope this solves the issue,Let me know if you have any issues.
    Thanks,
    Rajani

  • How to find out which cube/ods has the code

    hi,
    I want to find out which cube/ods has the start routine/update rules written in it.  Is there a table or Tcode to find out the code instead of opening each cube/ods to find out whether there is code in it or not.
    Thanks,
    Sam

    hi Sam,
    take a look
    /message/3483792#3483792 [original link is broken]
    try RSTRAN, field STARTROUTINE
    related tables
    RSAROUT
    RSAABAP
    RSAABAPINV
    RSAROUTT
    Technical name of start routine
    Re: How to get info about a GP* program?
    Re: Search for start, update rule, etc. that uses infoobject
    if couldnt find out, you can use ST05 'sql trace', open 2 session, one for create start routine, and one for ST05, activate with option 'sql trace', then create start routine and 'deactivate trace' and 'display trace', and check out the tables list
    hope this helps.

  • How to find out what text encoding has been used in mp3 tag

    Hello
    I have some foreign songs that I am importing into itunes. When a song called "04.公路 塵埃 北合起." gets imported, it comes up in itunes as "04.§Ω∏Ù π–ÆJ •¶X∞"
    Now I don't know a lot about different text encodings, but from what I've read on the forums is that the problem is that the tags that are encoded on the srcfiles are not unicode. I have tried the java application "UnicodeRewriter" recommended elsewhere in the forums, but both the commone Chinese ecodings, viz Big5 GBK etc.
    Is there a way to cut a world from (eg a chinese glyph) and somehow find out what text encouding has been used?

    Sorry, that question wasn't very well phrased. I'll try it again.
    I have some foreign songs that I am importing into itunes. When a song called "公路 塵埃 北合起" gets imported, it comes up in itunes as "§Ω∏Ù π–ÆJ •¶X∞"
    Now I don't know a lot about different text encodings, but from what I've read on the forums is that the problem is that the tags on the srcfiles are not unicode. I have tried the java application "UnicodeRewriter" recommended elsewhere in the forums, but whatever I sent the source encoding to, eg Big5, GBK, or one of about 9 others, I just get different types of garbage coming through.
    Is there a way I could take the original glyph in the file name (which shows up correctly on my desktop) and paste it into some sort of table. That table will then show me how that glyph will look in all different encodings without the correct conversion. So if I can match my "公" to my "§" I'll be able to see what the src encoding is.
    I know this is a longshot, but any help appreciated.
    Sorry for the rather rubbish explanation earlier.

  • How to find out the columns which has 16 digit credit card number

    Hi All,
    I have a requirement where in i need to find out the columns which has 16 digit credit number in it and create a report with owner, table name and column name.
    The issue is that the credit card number can be entered in any columns of any table of any schema. For example the credit card number can be entered in any description field(eg: The number is 4001412134642881), in that case i need to filter only the numbers and do the LUHN check to validate the credit card number.
    Please provide me a suggestion on how to scanl the values of all the columns to know the column which has credit card number.
    Regards,
    Raj.

    Tell me this - how the hell do you have a database with credit card number data and NOT know which columns of which tables contain credit card numbers? (and how on earth is this data NOT encrypted!?)
    How is what you want to do, NOT a fishing expedition to hack a database that may or may not be storing credit card details?
    And do you honestly think that we should simply trust that once you have extracted these numbers, performed a Luhn algorithm to verify these as credit card numbers, you are not going to fraudulently use these credit card numbers!?
    I have marked your posting as an attempt to hack an Oracle database for fraudulent use of credit card data. I hope that your OTN account is terminated soon and trust that your too much of a coding idiot to actually succeed in this endevour.

  • How to find out if a table has logging on?

    I need to temporarily turn off logging, and restore the logging setting afterward.
    How do I find out if a table has logging on or off before my change?

    TUBBY_TUBBZ?alter table tablea nologging;
    Table altered.
    Elapsed: 00:00:00.28
    TUBBY_TUBBZ?select logging from dba_tables where table_name = 'TABLEA';
    LOGGING
    NO
    1 row selected.
    Elapsed: 00:00:00.00

  • How to find out where a variable has been used?

    How can I find out where a variable has been used within a package/interface/procedure?
    Should I check it using repository's internal tables?
    Thanks

    Hi,
    you have to make some queries to find variable used in which ODI object.
    like, it fetch the variable with scenario name and scenarion can serve your need.
    select v.i_var,v.var_name,s.scen_name from
    ODEV91119_ODI_WORK.snp_var v,ODEV91119_ODI_WORK.snp_scen s
    where
    s.i_var=v.i_var
    and s.scen_NAME='V_BTCH_NAME'
    and agree with SH answer
    Thanks

  • How to find out when a file has been written to ?

    Hello All,
    In an application I want to open up a file (while letting another process write to it). As stuff is getting written to the file I want to be able to process that data (getting close to real-time as possible). How would one go about finding out when new data has been written to the file ? Does Java provide some alerting mechanism for file changes ? Thanks in advance...
    -Pete

    Maybe you could keep tabs of the file size. If the file size grows (which it will do each time the writing process flushes that files output buffer), then the file was written to.
    What I'd like to know is if there is some way to monitor the entire drive for changes and respond to stuff like that. I know that the Win32 API provides services that monitor the file system for changes, but I don't know if other OS's do... or if Java provides an interface to those features.

  • How to find out if a user has a deferred task

    In my WF, I will add a deferred task to a user. If that user already has a deferred task then i want to skip it. How do we find out if a user already has a deferred task? Thanks

    This should help you
    <notnull>
    <ref>view.accounts[Lighthouse].properties.tasks[taskname]</ref>
    </notnull>

  • How to find out if a table has been changed?

    hello
    how can I find out in a zreport, if a specific table has been changed and  data has been added or deleted?
    like for instance the date of last change to the table?
    thanks
    Alisa

    Alisa...you can do it following manner
    * Execute the report RSVTPROT to extract the changes done to database table
    * table with output going into memory
    TYPES: BEGIN OF ty_abap_list.
            INCLUDE STRUCTURE abaplist.
    TYPES: END OF ty_abap_list.
    DATA: gt_abap_list  TYPE STANDARD TABLE OF ty_abap_list.
      SUBMIT rsvtprot AND RETURN
        EXPORTING LIST TO MEMORY  USING SELECTION-SCREEN 1000
                                  WITH cusobj   EQ c_tabname "Table Name
                                  WITH dbeg     EQ gv_begdate
                                  WITH tbeg     EQ c_begtime
                                  WITH dend     EQ gv_enddate
                                  WITH tend     EQ c_endtime
                                  WITH objfirst EQ ''
                                  WITH tabfirst EQ 'X'.
    * Extract the list from memory
      CALL FUNCTION 'LIST_FROM_MEMORY'
           TABLES
                listobject = gt_abap_list
           EXCEPTIONS
                not_found  = 1
                OTHERS     = 2.

  • How to find out if a NODE has any CHILD NODES in a hierarchical tree?

    I want to find out programmatically if a node in a tree has CHILDREN.
    My requirement is this: I want to only show nodes for which the user has permission to execute the program that node is associated with.
    Problem is, my tree population query will not show the child nodes, BUT the sub-menu nodes are displayed and I need to get rid of these nodes.
    There is a function to find out the PARENT of a tree node (FTree.Get_Tree_Node_Parent), but noting to find out if children exist for a node or not?
    What I thought of was to display the tree and then traverse it from the ROOT onwards and then if a NODE is a submenu node (I can find this out by checking the PROGRAM value. If this is NULL it is a sub-menu node) and IF IT HAS NO CHILD NODES then I can delete the node.

    Please provide the examples with DATA
    as far as i know we cannot get the Child Nodes but NODE's Parents we can get
    parent_node := Ftree.Get_Tree_Node_Parent(htree, :SYSTEM.TRIGGER_NODE);I faced the similar problem but i solved it with query.
    Provide the data and your Tree query then we can help

  • How to find out if AE_init_append_data.xml has been imported or not?

    HI Gurus,
    Is there a way in CUP to find out if the initial config files have been uploaded or not the AE_init_append_data.xml. There are 2 files which need to be uploaded initially. However the other one uses a clean and insert option. So I think if I do that again, I would be allright. But the init_append.xml uses the append option. So is there a way I can find out if this is already uploaded. A table name which would contain the data from these files perhaps?
    Regards,
    CP

    Hi Prakash,
    I think you can upload the 'AE_init_append.xml' file. Anyways, you will select the append option, so it will just append(if it was uploaded earlier). There will be no problem if you upload the file.
    Thanks & Regards,
    Venky.

  • How to find out if a user has no more resource accounts?

    I want to check to see if a user has no more resource accounts tied to it. The only resource account left is Lighthouse and nothing else.
    Do you know how I do this?
    Thanks

    I was able to find disabled users using the below code. Does anyone know how I can find users who have only Lighthouse account and nothing else? I want to add this to the search criteria.
    <Action id='0' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='queryObjectNames'/>
    <Argument name='type' value='User'/>
    <Argument name='single' value='false'/>
    <Argument name='attributes'>
    <map>
    <s>lhdis</s>
    <s>true</s>
    </map>
    </Argument>
    </Action>

Maybe you are looking for

  • Installation problem with solaris 10

    Hi While installing solaris 10 x86 I skipped the installation of solaris 2 of 3 CD . After than I installed solaris 3 of 3 CD. When the installation is completed I cannot find some important commands like vold & volume management commands. Now how ca

  • MS office settings via Zen

    Hi Everyone, How does one manage MS Office settings on the desktop after Office has been installed? I have a custom MSI that I use to install office. That works fine for installation. Now I have to change a few settings that I can't find in the regis

  • Data collection task execution in UCMON

    Dear Friends I am using flexible upload method and load from data streams for data upload. Both methods are assigned to my data collection method which in turn is assigned to the task. When i execute the data collection task in consolidation monitor

  • ISO code 0 is not correct in the VAT registration number

    Hello everyone! Where can I adjust this error message so that I can make it as a Warning only? Thank you. Message No. AR191   --  ISO code 0 is not correct in the VAT registration number

  • FCC to File

    Hi Frnds, Iam doing FCC to File Interface my Source Text file Like Below i want send xml File for Receiver Side, How can i Achieve this with Sender FCC Parameters. Please Help on this. "H","E100","M","IT","102, ITPL Bangalore","Whitefield","BANGALORE