> From: John Leuner [mailto:[EMAIL PROTECTED]]
>
> > Hey, guys, this guy is trying to make a VM and has a question.
> I vaguely
> > remember us running into something like this before with
> Japhar, and I am
> > not sure how it was solved ... ?
>
> Hmm, I had some problems when I started using claspath too. In my case in
> wasn't with the constructor, but with things like File IO. For example
> some Classpath classes need to read in locale files from the file system,
> and this is triggered from class initializers (before my VM has even
> started anything that looks like a thread). Similarly when I try to run
> the kjc compiler (it's a free Java compiler written as part of the kopi
> suite) I have problems with code that gets called from initializers that
> wants to acquire locks on objects. At this stage there is no thread state
> yet because I haven't started the main thread. It's tricky to handle
> these.
>

Hmm.  It seems to me that if you're running anything at all, you already
have a thread of execution (a main thread), you just haven't created the
Thread object for that particular Thread.  Also, I am sure there is a good
reason, but why are you loading these other classes before loading Thread?
Are you trying to load Thread, and that is slurping those classes in,
perhaps?

What exactly is going wrong with file I/O?

BTW, we resolved the static initializer issue from the specs, it turns out
recursive static initialization is allowed.

--John

Reply via email to