The URLClassLoader may be the smartest one in Java at all.
  Of course it does. It loads classe that are:
    1. classes of inner members (fielsd).
    2. classes taht are return-types of methods.
    3. classes, that are parameter of methods.

  It does not load classes, that are not directly used. I.e.
  If your applet has a statement like
Class.forName("org.apache.log4j.Logger") the org.apache.log4j.Logegr class
is not loaded. And when you try to load the class that way you will get a
ClassNotFoundException, because Class.forname() uses BootStrap CL.
  Solution: use
Thread.currentThread().getContextClassLoader().loadClass()...
  Better off: this.getClass().getClassLoader().loadClass().

  Try and learn that is my motto.

  Lachezar

> HI,
>
> thanks for your reply.
>
> I don't know that much about on-the-fly class loading.
>
> Is it smart enought to know that if I load a class (A) that uses another
> class (B), it will load both class A and B ?
>
>
> thanks,
> ionel
>
> Lachezar Dobrev wrote:
>
> >  You can always decompress the jars on the Web-Server.
> >  Then the classes will be downloaded on request, which will not lower
down
> >the download size (it is getting bigger), but will make asynchronous
class
> >download available.
> >  I.E. The Applet loads some boot-classes to run the applet. When there
is
> >need to get the JMS classes it will query the server for these classes.
> >  This is best in case that you use limited J2EE functionality (as you
> >mentioned just JMS) but don't know which classes are required.
> >
> >  Reffer to the HTML Applet tag documentation on how to set up the
directory
> >styructure for that.
> >
> >  lachezar
> >
> >>Hi,
> >>
> >>In an Applet framework unsing the JMS, there are 6 packages to download
> >>(jboss-common-client.jar, jbossmq-client.jar, jnp-client.jar, log4j.jar,
> >>concurrent.jar and jboss-j2ee.jar) plus the needed classes for my app.
> >>
> >>Its then a "little" 940kb to be downloaded by the client. As some users
> >>have slow connection, is it possible to decrease this amount ?
> >>
> >>I'm using JavaWebStart for another project but I'd like this one to be
> >>100% web available.
> >>
> >>thanks,
> >>ionel
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>This sf.net email is sponsored by:ThinkGeek
> >>Welcome to geek heaven.
> >>http://thinkgeek.com/sf
> >>_______________________________________________
> >>JBoss-user mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/jboss-user
> >>
> >
> >
> >
> >
> >-------------------------------------------------------
> >This sf.net email is sponsored by:ThinkGeek
> >Welcome to geek heaven.
> >http://thinkgeek.com/sf
> >_______________________________________________
> >JBoss-user mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to