File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets 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: 37890
    
  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: 12756
    
    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