File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes A question about read message from resource from java class 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 » Beginning Java
Bookmark "A question about read message from resource from java class" Watch "A question about read message from resource from java class" New topic
Author

A question about read message from resource from java class

Thomas Chang
Ranch Hand

Joined: May 13, 2008
Posts: 61
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

Joined: Oct 13, 2005
Posts: 38088
    
  22
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

Joined: Apr 14, 2004
Posts: 10336

...or user the Properties class which does the splitting and mapping part for you.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A question about read message from resource from java class
 
Similar Threads
Calling a method from within a method in another class (in the same package)?
Address Book Java Issues
one to one unidirectional mapping in jpa
Generating Class Files from an XML Doc
A question about read message from resource from java class