[jboss-user] [Beginners Corner] - Re: read a local properties file
PeterJ
do-not-reply at jboss.com
Tue Jul 1 10:59:42 EDT 2008
Here is one possible way of doing this.
Place the properties (or data) file into server/xxx/data. (I placed mine in a subdirectory such as server/xxx/data/mystuff)
In your program, use the jboss.server.data.dir property to get the path for the data directory, and use that to access the properties file. For example:
String dataDir = System.getProperty("jboss.server.data.dir");
Properties prop = Properties.load(new FileInputStream(dataDir + "/mystuff/my.properties"));
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161818#4161818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161818
More information about the jboss-user
mailing list