This can be achieved, I do not see any problems here. Do as below:
Package the properties
file in the jar
and then bundle the jar in the ear
.
Using ant you can build the jar with the below command:
<target name="jarx.jar">
<jar destfile="${dist.dir}/jarx.jar">
<fileset dir="${classes.dir}">
<include name="**/*.*"/>
</fileset>
</jar>
</target>
How to access the properties file later?
If you want to access the properties file later from any class ClassX, you can simply write
InputStream is = ClassX.getResourceAsStream('/abc.properties');
EDIT:
The second part of the question is already answered here . But I would not advice it because the changes might not immediately reflect or get loaded, without a server start. Not sure on this point.
Also, you need to evaluate what if the jar is a sealed one?