This content has been marked as final.
Show 4 replies
-
1. Re: Getting a relative path
jaleyba Apr 28, 2006 8:13 AM (in response to jaleyba)Please, could somebody give me a clue in this matter ?
Thanks in advance
J -
2. Re: Getting a relative path
anders.hedstrom Apr 28, 2006 8:44 AM (in response to jaleyba)I guess you could use this:
System.getProperty("jboss.server.config.url");
ororg.jboss.system.server.ServerConfigLocator.locate().getServerConfigURL();
-
3. Re: Getting a relative path
jaleyba May 2, 2006 3:01 AM (in response to jaleyba)"anders.hedstrom" wrote:
I guess you could use this:System.getProperty("jboss.server.config.url");
ororg.jboss.system.server.ServerConfigLocator.locate().getServerConfigURL();
Thanks !!!
J -
4. Re: Getting a relative path
navalonna May 2, 2006 5:21 AM (in response to jaleyba)I think you have a better solution.
As conf directory of JBoss is in the application classpath, you can try to get your configuration file by getting it from the classpath.
Classloader cl = Thread.currentThread().getContextClassLoader();
InputStream is = cl.getResourceAsStream("your file");
After that you have a stream for your file and you'll be able to read it.
And that's all...