--- Christopher Seawood <[EMAIL PROTECTED]> wrote:
> 
> I'm using the 1.2pre1 release on a RH6.0 system.  I
> started developing
> this app that uses Swing under NT using Java
> Workshop 3.0 with Sun's 1.2
> release. I tried running the app under Linux and it
> immediately exits.  I
> don't explicitly create any threads in main() (just
> the main window) and
> the program exits when main() does.  Obviously, this
> isn't the behavior
> under NT.  Am I hitting some
> implementation-dependent feature of Java or
> is one of the versions not adhering to the spec?

The rule is that the VM exits when there are no more
dameon threads running or the user calls
System.exit(int). The GUI thread is a dameon so if you
are running a GUI app the program will not exit at the
end of main (main starts dameon a thread that exits
when main does). So if you program starts no other
dameon threads and it exits at the end of main this
correct behavior.

Ken

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to