This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes How Can I read a .properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How Can I read a .properties file" Watch "How Can I read a .properties file" New topic
Author

How Can I read a .properties file

Suhas Madap
Ranch Hand

Joined: Aug 29, 2006
Posts: 49
Hi,
Can some body help me, How to load a x.properties file in java, which is not available same package i.e. located some where else on the local hard drive.It would be so kind of all, if any one provide the Code snippet.


Thank you,<br /> <br />Suhas K Madap<br /> <br />If you understand what you're doing, you're not learning anything."
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

This program will load properties file into property object.



Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56192
    
  13

Please reserve this forum for advanced questions. I have moved this to a more appropriate location.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Suhas Madap
Ranch Hand

Joined: Aug 29, 2006
Posts: 49
Hi,
Thank you very much Prabhu, if I want to load a property file, which is a part of classpath, then how can i do that?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How Can I read a .properties file
 
Similar Threads
JSP Error Handling
Decrypt Zip File with 128bit AES
saving xml file to a different server/dir in a servlet
JFileChooser: setSelectedFile() hangs
Filecontent delete