mwk Posted November 16, 2006 Share Posted November 16, 2006 I want to use locale, i18n for reports. All files are in the same rep : file.jrxml and files file.properties, file_en_US.properties, etc. I've created and tested in iReport: works well I need to use it in a J2EE app and my question is : why it's necessary to put dir in classpath? is there an other way to keep all file in the same dir and give a parameter to tell where are located *.properties without adding this rep to classpath? how does it work? I've several different dirs (1 per report) and i can't dynamically add every path to classpath. Thank you for your advice!Mwk Link to comment Share on other sites More sharing options...
Teodor Danciu Posted November 16, 2006 Share Posted November 16, 2006 Hi, You could load the ResourceBundle yourself from whatever location you want, prior to passing it as the value for the REPORT_RESOURCE_BUNDLE built-in parameter at report fill time. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
mwk Posted November 18, 2006 Author Share Posted November 18, 2006 Hi, I've seen this parameter, but now I think my problem is a Java programming problem. I don't know how ResourceBundle finds files .properties : java.util.MissingResourceException: Can't find bundle for base name reportsample1, locale fr_FR at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773) at java.util.ResourceBundle.getBundle(ResourceBundle.java:538) I don't know where to declare the dir where is located my file reportsample1.properties (eg /base/rapports/reportsample1.properties) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now