Thanks for your answer Andrew.
Well, you know...when class "A" is loaded by a custom class loader, other
"A" dependent classes (say B, C, etc) are also loaded by the same
classloader (URLClassLoader in my case). So there shouldn't be any problem
since the needed jar/zip files are in custom URLClassLoader path!
That's why I surprise!
Any idea ?
Best Regards,
Armond
> -----Original Message-----
> From: Andrew Palumbo [mailto:[EMAIL PROTECTED]]
> Sent: Fri, January 19, 2001 11:16 AM
> To: Armond Avanes
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: Re: "Dynamic Class Loading" & LnF problem !!
>
>
> Armond Avanes wrote:
>
> > Hi Gurus,
> >
> > I'm just having some problem with LnFs! The scenario is that I
> want to load
> > my application's look&feels dynamically. On the other hand I
> don't want to
> > put the LnF jar/zip files in the classpath. So the first
> solution everyone
> > may think of is to use URLClassLoader! I'm also doing so. Here
> is the L&F
> > list (which can be found in app configuration file) :
> >
> > L&F-Name="MacOS"
> > L&F-Package="it.unitn.ing.swing.plaf.macos.MacOSLookAndFeel"
> > L&F-Resource="macos.jar"
> > L&F-Name="Slaf" L&F-Package="com.memoire.slaf.SlafLookAndFeel"
> > L&F-Resource="slaf.zip"
> > ...
> >
> > And here is my code for loading and applying L&Fs :
> >
> > public void justATestMethod()
> > {
> > LookAndFeel lnf =
> >
> (LookAndFeel)loadObjectFromResource("it.unitn.ing.swing.plaf.macos
> .MacOSLook
> > AndFeel", "macos.jar");
>
> I haven't done swing or runtime linking in a while, but I think
> what happened is that you didn't load the rest of the Look and Feel
> classes... Since the jar isn't in the classpath, things like the L&F's
> JPanel replacement need to be linked explicitly, as well...
>
> Sorry I can't be more explicit, right now, in what you have to do, but
> hopefully this has helped somewhat.
>
> -Andrew
>
>
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing