aspose file tools*
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
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: 38363
    
  23
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: 12769
    
    5
A glance at the java.util.Properties class JavaDocs will show you multiple methods for loading a Properties object from streams.

Bill
 
 
subject: How to write a java program to read properties file?