0 Replies Latest reply on May 2, 2005 5:16 AM by tslh

    [Deploy] Pb getting deployed JAR url

    tslh

      Hello!

      I'm rather new to Jboss, so I don't manage to solve this problem:

      I'm writting a MBean for JBoss 4.01, packed as a SAR file. In this file, I have a jar file that I want to link in my application. So the tree looks like this:

      MyMBean.sar
       |
       |-- bin
       | |---- MyCoolService.class
       | |---- MyCoolServiceMBean.class
       |
       |-- res
       |---- MyOtherJAR.jar
      

      In my MBean, at startup, I ask him to build an URLClassLoader (called urlcl) on /res/MyOtherJAR.jar by passing it a new URL("/res/MyOtherJar.jar!/") and then I invoke urlcl.loadClass("class.in.MyOtherJAR");
      That call fails.

      I think my problem is in the URL designation: how can I get the path where my sar is deployed?

      Many thanks to everybody who could help me.