Re: Dynamically load laf




>First off, it's almost always a mistake to write your own class loader.
Yeah, I noticed. I did try to use the URLClassLoader, but I had (I
realize after reading your post) given it invalid URLS, so of course
it did not work... After feeding it good urls it works.

>try to dynamically add a L&F jar to the classpath after the event
>thread has been created, since it will have been loaded by the system
I would do all this before the EDT is created. I.e in the constructor
of my first class.

I have tried the advice you gave me and so far it seems to be working
very nice. I will have to try it a bit more though.

Thank you very much!
regards
Daniel

.



Relevant Pages

  • Re: alternative to my ClassLoader hack
    ... I tried to modify your "startApplication" method so ... *and* the URLClassLoader. ... The classes loaded by the default class loader, and those loaded by the new class (the second time MyClassLoader is loaded) don't match, because the java.* classes are getting loaded too. ...
    (comp.lang.java.programmer)
  • Re: Plugin architectures
    ... if(cl instanceof URLClassLoader) { ... would do it if your current class loader happens to be a URLClassloader. ... I have no idea what the normal default type of a class loader is though. ... ClassLoader cl = ClassLoaderTest.class.getClassLoader; ...
    (comp.lang.java.programmer)
  • Re: alternative to my ClassLoader hack
    ... *and* the URLClassLoader. ... default class loader, and those loaded by the new class (the ... Don't hesitate to report your findings if/when you find the time ...
    (comp.lang.java.programmer)
  • Re: Confused about class loaders
    ... > URLClassLoader with a null parent that the system will be forced to use ... > my class loader (in this case I would probably add the libraries from ... although this might be a bit of a pain. ...
    (comp.lang.java.programmer)