1 Reply Latest reply on Jan 2, 2007 4:22 PM by Ryszard Kozmik

    Problems with Classloader

    Patrick Di Loreto Newbie

      I'm using Jboss 3.2.7. My application has to load some classes from custom archive (jar format).

      I have a plugin factory invoked by an EJB that use an URLClassloader created as follow :

      String url = /myHome/plugins/
      
      classLoader = new URLClassLoader(url, Thread.currentThread().getContextClassLoader());
      


      Then I use it to instanciate my classes:

      Object o = classLoader.loadClass(myClassName).newInstance();
      


      Everything works right using Win32 but when I deployed that application on linux (ubuntu, solaris) based systems, the classLoader give me back a null element.

      Under linux I checked that the application can read and open the plugin-jar archives, because it reads an xml file descriptor, but when it instanciates the class, the classloader give back a null value.

      How can I istanciate a URLClassloader that works right under linux too ?

      Thx