Each getImage starts a separate Thread and separate request
so it is no wonder you are running into problems. Your
applet should use MediaTracker and only do a few Threads
at a time. It is also much faster to load a few images
and cut them up in the Applet - assuming your big collection
comes from cutting up a few images.
> Maxim Senin wrote:
>
> Hi,
>
> I have this problem loading hundreds of images in my applet from the
> server (Tomcat 3.2.1) with ~ following code:
>
> // in applet.init()...
> for (int i=0; i<1000; i++) {
> URL location = getClass().getResource ("/images/image"+i+".gif");
> Image img = this.getImage (location);
> if (img != null)
> images.addElement (img);
> }
> // ...
>
> After loading ~50-60 images this way, I start to get
>
> Ctx( ): IOException in: R( + /images/imageX.gif + null) socket
> write error (code=10053)
>
> for all resources including classes of applet being loaded by class
> loader.
>
> PLEASE HELP!!!
>
> Cheers,
> Maxim
--
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP
ISBN 0-7821-2809-2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]