This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to write a java program to read properties file? 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 » Java in General
Bookmark "How to write a java program to read properties file?" Watch "How to write a java program to read properties file?" New topic
Author

How to write a java program to read properties file?

Santhu Mum
Greenhorn

Joined: Mar 25, 2013
Posts: 1
Properties file:
Comm.mj.1.jk = aaaaa
Comm.mj.1.rf = /*path*/
Comm.mj.1.fe = par

Comm.mj.2.jk = bbbbb
Comm.mj.2.rf = /*path*/
Comm.mj.2.fe = par

Comm.mj.3.jk = ccccc
Comm.mj.3.rf = /*path*/
Comm.mj.3.fe = par

Specifics for each jk tag should be maintained by jk tag and stored in a vector or hash table for repeated reference... Java code should read all properties specific for 1,2,3 and store.. Could you help me with the java code for this?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Welcome to the Ranch

We do not hand out complete solutions, but would be happy to help you if you show what you have achieved so far.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
A glance at the java.util.Properties class JavaDocs will show you multiple methods for loading a Properties object from streams.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to write a java program to read properties file?
 
Similar Threads
Help setting jforum and Apache->Tomcat connector
IBM RAD questions
sql file problem
Apache don't send to Tomcat (mod_jk)
Regex - Java or Perl