jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes Can I use include file in resource bundle properties file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can I use include file in resource bundle properties file?" Watch "Can I use include file in resource bundle properties file?" New topic
Author

Can I use include file in resource bundle properties file?

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
Hello all
Can I do include properties file inside properties file when using resource bundle?
If not what alternative I can use?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42356
    
  64
Properties file have no notion if including files. If for some reason (which one?) you wish to maintain several properties files, you could concatenate them during the build process.


Ping & DNS - my free Android networking tools app
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
well the reason is that i like to make main properties file and
then i need section in the file that every body else can customize
to they can only include the main properties file to there own one.
i was sure that the Resource Bundle has this ability , what can i do if
i based my configuration on ResourceBundle and now i need to add the include function?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42356
    
  64
You could probably write a class that extends Properties or ResourceBundle, but that might easily break the overall functionality.

If you're using Ant you could write a little Ant task that runs as part of your build process, and which gathers all the files and merges them one into one that gets deployed.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Can I use include file in resource bundle properties file?