• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about read message from resource from java class

 
Thomas Chang
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a file such as "myinfo.properties" which contains following data:


Now I want to read the message in my java class. How can I do that?
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More of a beginner's question;

Split each line on the = and put the first part as Key and the second part as Value in a Map.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...or user the Properties class which does the splitting and mapping part for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic