Board index » jbuilder » Java program not closing under XP SP2 (but under W2000)

Java program not closing under XP SP2 (but under W2000)


2005-08-04 11:59:59 PM
jbuilder14
Hello,
i have a Java program (1.5) which is closing down properly on my
Windows 2000 (SP4) PC (closing down properly: process is
terminated after the main frame has been closed. I use
system.exit(0)), but on my Windows XP SP2 PC the same program
under the same circumstances (a system.exit(0) is issued too)
remains in memory as process (the main frame has been closed
and is not visible). I have tried a dispose() before my
system.exit(0), but no change.
protected void processWindowEvent(WindowEvent e) {
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
if (canClose()) {
dbConn.shutDown(); // Datenbankconnection schliessen
final WindowEvent winEvent = e;
Runnable shutDownRunnable = new Runnable() {
public void run() {
if (TiamoRemoteInterface.shutdown()) {
Main.super.processWindowEvent(winEvent);
setVisible(false);
dispose();
System.exit(0);
}
}
};
Thread shutDownThread = new Thread(shutDownRunnable);
shutDownThread.setName("RemoteShutDownThread");
shutDownThread.start();
}
}
}
any hints?
thanks
Oliver
 
 

Re:Java program not closing under XP SP2 (but under W2000)

Oliver wrote:
Quote

Hello,

i have a Java program (1.5) which is closing down properly on my
Windows 2000 (SP4) PC (closing down properly: process is
terminated after the main frame has been closed. I use
system.exit(0)), but on my Windows XP SP2 PC the same program
under the same circumstances (a system.exit(0) is issued too)
remains in memory as process (the main frame has been closed
and is not visible). I have tried a dispose() before my
system.exit(0), but no change.

Sounds as though the thread is not terminating. Might want to use a profiler
to find out which memory area is not being released.