-
1. Re: Resource Hell
genman Jan 24, 2007 7:54 PM (in response to cansado)Do you know what call is being made, e.g. Class.loadResource() or something? If so, any file in the classpath (which includes the contents of all .jar files) should work.
If not, you can get the path to JBoss as a System property. -
2. Re: Resource Hell
cansado Jan 25, 2007 11:23 AM (in response to cansado)Thank you for your response.
Unfortunately this library is much more insidious than that. It needs an actual file on the file system. I'm sure it's calling FileInputStream(filename) somewhere in the code, which only serves to anger me.
I will have to pursue a different solution, since currently the config file is in the SAR's META-INF directory.
Thanks again for your help. -
3. Re: Resource Hell
peterj Jan 25, 2007 1:03 PM (in response to cansado)genman's second suggestion should work if you have an exploded sar:
String server = System.getProperty("jboss.server.home.dir");
StupidClass sc = new StupidClass(server + "deploy/myservice.sar/META-INF/some.config");
I think there is even a way to access the file if you have a packaged sar, but I would have to dig for that.