Jump to content
JasperReports Library 7.0 is now available ×

i18n locales without classpath in my java app


mwk

Recommended Posts

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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...