>From: Vojta Filip <[EMAIL PROTECTED]>
>
>On Tue, 14 Dec 1999, John Keiser wrote:
>
>I didn't found where first Thread is created. Must I create it explicitly
>or do lazy creation in Thread.currentThread() ? Why MainThread do not
>extends Thread? (or why is not Runnable?)
>

There is no way for Classpath to create the first Thread, because Java code 
must be run in the context of a Thread object, and Classpath is Java code.  
Therefore it is the VM's responsibility to do so.  (Unless you can think of 
a way Classpath can do it?)

I have been thinking about MainThread; it was probably a silly idea.  
Really, once you, the VM, have already created the first Thread, all you 
have to do is get the class that was specified on the command line, get the 
main() method, and call it with the args you got from the command line.  You 
must do all these things in the context of that particular Thread object.

>
>I think there should be else one call back - String.intern() - whenever
>new literal string or String constant is created. (but maybe it must be
>only in 1.2 ?? I don't know.)
>

I turns out that one can be implemented pretty efficiently without you 
having to do it.

I am posting my response to your <clinit> problem in a separate message so I 
can send it to Japhar too.

--John Keiser

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Reply via email to