• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to write a java program to read properties file?

 
Santhu Mum
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A glance at the java.util.Properties class JavaDocs will show you multiple methods for loading a Properties object from streams.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic