javaw.exe proccess

Discussion in 'Java' started by patrick, Jun 28, 2004.

  1. patrick

    patrick Guest

    Ive got a java swing application with many classes,
    TimerListener's,Timer's, reads and writes to many files.

    The problem is that when I close the application there is still a javaw.exe
    process running everytime.which I delete manually. Obviously some thread
    which is not killed off.

    I dont know where to look to find the source of this.
    Is there a way of narrowing down the source of the problem??

    TIA
    patrick
     
    patrick, Jun 28, 2004
    #1
    1. Advertising

  2. patrick wrote:
    > Ive got a java swing application with many classes,
    > TimerListener's,Timer's, reads and writes to many files.
    >
    > The problem is that when I close the application there is still a javaw.exe
    > process running everytime.which I delete manually. Obviously some thread
    > which is not killed off.
    >
    > I dont know where to look to find the source of this.
    > Is there a way of narrowing down the source of the problem??
    >
    > TIA
    > patrick
    >
    >

    You could arrange for the app to call System.exit(int) when you have
    finished.

    Or call JFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    Steve
     
    Steve Horsley, Jun 28, 2004
    #2
    1. Advertising

  3. patrick

    Roedy Green Guest

    On Mon, 28 Jun 2004 21:47:06 +0100, "patrick" <>
    wrote or quoted :

    >The problem is that when I close the application there is still a javaw.exe
    >process running everytime.which I delete manually. Obviously some thread
    >which is not killed off.


    See http://mindprod.com/jgloss/close.html
    and http://mindprod.com/jgloss/shutdown.html

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Jun 28, 2004
    #3
  4. patrick

    Tony Morris Guest

    > I dont know where to look to find the source of this.
    > Is there a way of narrowing down the source of the problem??


    You have non-daemon threads running.
    Find them with a profiler.
    Prevent them from running indefinitely with correct application logic.

    --
    Tony Morris
    (BInfTech, Cert 3 I.T.)
    Software Engineer
    (2003 VTR1000F)
    Sun Certified Programmer for the Java 2 Platform (1.4)
    Sun Certified Developer for the Java 2 Platform
     
    Tony Morris, Jun 29, 2004
    #4
  5. Roedy Green wrote:
    > See http://mindprod.com/jgloss/close.html


    The order of events you list under "Final Close" is IMHO wrong.

    Calling dispose() should be the last, not the first action. One should
    first remove the frame from all Collections and events it has subscribed
    to (just a special kind of collection for this case). Usually you want
    to give your data model(s) a good look. You should also get rid of all
    other references (this is the moment when a programmer recognizes that
    it was maybe not a good idea to distribute the reference to everyone and
    it's dog in then program :))

    That way you can avoid having another thread (there should be none, but
    messing up Swing thread handling is common ...) resurrecting the frame
    via a setVisible(true) after you called dispose().

    Getting the frame out of every Container is not necessary, since you
    can't put a frame in a Container :).

    For immediate user feedback it is maybe a good idea to first call
    setVisible(false), then do the cleanup, then call dispose().


    /Thomas
     
    Thomas Weidenfeller, Jun 29, 2004
    #5
  6. patrick

    Stefan Poehn Guest

    "patrick" <> schrieb im Newsbeitrag
    news:Gs%Dc.3404$...
    > Ive got a java swing application with many classes,
    > TimerListener's,Timer's, reads and writes to many files.
    >
    > The problem is that when I close the application there is still a

    javaw.exe
    > process running everytime.which I delete manually. Obviously some thread
    > which is not killed off.
    >
    > I dont know where to look to find the source of this.
    > Is there a way of narrowing down the source of the problem??
    >


    Start your java app with java.exe (not javaw.exe) and press
    Ctrl+Shift+Break. You will get a listing of all threads on the console.

    > TIA
    > patrick
    >
    >
     
    Stefan Poehn, Jun 29, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SAP BASIS Consultant
    Replies:
    1
    Views:
    1,830
    icebattle
    Nov 14, 2003
  2. javaw.exe

    , Dec 16, 2003, in forum: Java
    Replies:
    3
    Views:
    472
    Chris Smith
    Dec 16, 2003
  3. Ken
    Replies:
    3
    Views:
    10,978
  4. Roy Epperson

    Tomcat 5* and javaw.exe

    Roy Epperson, Dec 31, 2005, in forum: Java
    Replies:
    0
    Views:
    790
    Roy Epperson
    Dec 31, 2005
  5. Tim Ward

    INT 3 in javaw.exe

    Tim Ward, Jun 23, 2006, in forum: Java
    Replies:
    0
    Views:
    491
    Tim Ward
    Jun 23, 2006
Loading...

Share This Page