To "start" a new thread, call x.start(); - in basic terms, this will mean
the x.run() method (or runnable.run()) is called, but you can continue
doing whatever it was you were doing without waiting for the run() method
to end. that's the guts of how threads work.
cheers
dim
On Wed, 18 Jul 2001, John Baker wrote:
> > I don't know why it is different for run() than for start() - I haven't used
> > either, so I don't understand what the difference in the two is in the
> > Thread class(doesn't start() call run()?)
>
> What I meant by this is just doing:
>
> MyThread x = new MyThraad();
> x.run();
>
> calls the run method (containing the class that has problems being created)
> within the current Thread, ie no new Thread is started, This is when the
> problem 'goes away'.
>
> When start is called, the Thread starts (Obviously). This is when the
> problem appears for me.
> >
> > hope this helps,
>
> I'll read tomorrow, digest, and attempt to understand :-)
>
> Still, this must be a bug... people will want to use their own Threads
> within a web application.
>
> > Charlie
> >
> > > -----Original Message-----
> > > From: John Baker [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 18, 2001 12:31 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Cannot find my JavaBeans
> > >
> > >
> > > On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > > > This seems to be a bug in Tomcat. Shouldn't someone who
> > > actually knows
> > > > > how it all works take a look?
> > > > >
> > > > > John
> > > >
> > > > Yep. Even the cocoon mailing list is full with entries
> > > related to tomcat
> > > > and its classpath :-). Under some misterious circumstances the
> > > > "<context</WEB-INF/lib" Classpath disappears.
> > > >
> > > Well I managed to make it a very non mysterious circumstance.
> > > I just started
> > > a Thread from an object that was a ServletContextListener.
> > > When I called
> > > start it lost classes. When I called run it worked fine. I
> > > had no problems
> > > replicating it.
> > >
> > > What is the cocoon mailing list?
> > >
> > > --
> > > John Baker, BSc CS.
> > > Java developer, Linux lover.
> > > I don't wanna rock, DJ.
> > >
>
> --
> John Baker, BSc CS.
> Java developer, Linux lover.
> I don't wanna rock, DJ.
>