Home
Analytics
Reading properties file from within a JAR
rdowd
Hi,
Am using BIRT v2.2.1 and using BIRT plugin for Eclipse. I want, in my BIRT report, to ensure all text displayed to the user is localized. I've got a properties file called customer.properties containing all my key/value pairs.
This properties file lives in the resources directory in my jar file (customer.jar). How can I get
BIRT to read the message keys from the property file (which is in the jar file) ? Rather than having the properties file on the file system..
Any help would be great.
Thanks, Ro
Find more posts tagged with
Comments
sschafer2
If the jar file is in the classpath you should be able to get it via ****.getClass().getResource() or getResourceAsStream(). Using getResourceAsStream you can load it directly into a Properites object.