My project structure is as follows:
matrixWeb
----src(for Java code)
----WebContent
----WEB-INF
----lib
----custome-develop.jar
----resources (contains some config files under this folder)
Now another java code (custome-develop.jar) is being used and this code is packaged as jar and put inside the lib folder with all the references. Now from my 'src' folder I am able to access code in that jar file. But that custome-develop.jar needs to access the config files to under resource folder to do processing (resource folder contains property files for queuemanager name, queuename etc.).
Could anybody tell me how to access the resource folder to get the property file.
I used below code but in that custome-develop.jar but did not worked:
InputStream pin = Thread.currentThread().getContextClassLoader()
.getResourceAsStream("/../../resources/QueueDetails.properties);
this 'pin' is null object.
I am using JBoss 7.1 and Java6 and doing admin console deployment!
Please help me regarding this.
Thanks, Debashis
Add your properties file in Jboss
standalone.xml
considering that you are using standalone applicationThen you can able to access this properties by using
See details