wood burning stoves 2.0*
The moose likes Other JSE/JEE APIs and the fly likes Reading value from properties file using ResourceBundle and then call a method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply locked New topic

Reading value from properties file using ResourceBundle and then call a method

dbala subramaniam
Ranch Hand

Joined: Jul 20, 2003
Posts: 73
Hi All
My Requirment is

I am reading all report parameters from my properties file,
say WMTConfig.properties, then all the values I am reading using ResourceBundle via WMTConfig.java, then all the values I am setting in
2 HashMaps in WMTConfig.java, but I need to pass the HashMaps to main Java Programs and other programs for that I need put a method inside a
once called it will return HashMap which inside the WMTConfig.java sothat this method can be invoked from any job programs and get the HashMap , but inside WMTCOnfig is not accepting any methods except only one constructor, so how to resolve the problem,
I don't have any other file which read the values from properties file,
only file which will read property file called WMTConfig.properties is
WMTConfig which accepts no methods and only one constructor
Malformed Expression-try{
config = ResourceBundle.getBundle("WMTConfig", Locale.ENGLISH);
illegal Start of Expression-before method name declaration
public HashMap ReportParameters(){ which inside a WMTCOnfig.java
please clarify,suggest
advance thanks
with regards
Joel McNary

Joined: Aug 20, 2001
Posts: 1817

Thank you for your posting to JavaRanch. I do realize that you are probably eager to get an answer to your question, but posting to multiple forums is not the best way to acheive that. If all the replies are in one place, then you will get a better answer -- as will anybody who comes after you looking for information on the same problem.
To that effect, I am closing this thread in this forum. Replies should be posted here.
[ August 27, 2003: Message edited by: Joel McNary ]

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
jQuery in Action, 2nd edition
subject: Reading value from properties file using ResourceBundle and then call a method
Similar Threads
Using Properties instead of HashMap when dealing with Strings
Reading Report parameters from property file and create a method inside a properties
Reading values from Properties file using Resource Bundle
Reading values from properties file using ResourceBundle and then insert a method
Custom ResourceBundles