I haven't tested under 1.2 yet, but a similar problem exists in v1.1.7

        Maybe I'm misunderstanding threads, but the following code will go through the 
run method once and exit:
        Unfortunately, I'm doing this code from memory so it might not be perfect...

        import java.net.*;
        public class ThreadEg implements runnable {
                private Thread myThread;
                
                public ThreadEg() {
myThread = new Thread(this);
myThread.start();
                }

                public void run() {
                        System.out.println("inside the run statement...");
                }

                public static void main(String [] args) {
                        ThreadEg threadEg = new ThreadEg();
                }
        }

        This results in the sample output
        Inside the run statement...
        Being displayed once.
        The program was executed with green threads.

        Dave
----------
From:  Nathan Meyers [SMTP:[EMAIL PROTECTED]]
Sent:  Thursday, July 08, 1999 10:50 AM
To:  Rob Nugent
Cc:  [EMAIL PROTECTED]
Subject:  Re: Java3D and 'main()'

Rob Nugent wrote:
> 
> Many thanks to everyone who answered me on this issue. Nathan managed to put me on 
>the
> right track:
> 
> The window was indeed visible until main() exited (I think I neglected to say this 
>in my original post).
> 
> I was running with jdk1.2pre1 with green threads. Moving to native threads solved 
>the problem, although
> I can' explain why. This is a good enough solution for me until I can move to 
>RedHat60/glibc2.1/jdk1.2pre2
> 

This is comforting in a troubling sort of way :-). I had hoped moving to
green threads would solve the problem, and ended up having it backwards.
Apparently, the AWT threads are being started... yet the application
terminates when the main thread ends. Sounds buggy to me. Has anyone had
an opportunity to try this under pre2?

Nathan


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




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

Reply via email to