This content has been marked as final.
Show 1 reply
-
1. Re: Accessing resources from within a MBean
nickman Jul 9, 2004 11:29 AM (in response to adenied)Andreas;
Part of the problem may be how you are using the SystemClassLoader to load the resorce. What you need is to use the MBean's own class loader, so in your code you should use something likethis.getClass().getClassLoader().getSystemResource("resources/simple.xml");
This is what works for our code:InputStream is = this.getClass().getResourceAsStream(resourceName);
Cheers.
//Nicholas