<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Read/Write Java Properties Files</title>
	<atom:link href="http://www.factorypattern.com/how-to-readwrite-java-properties-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/</link>
	<description>Just another Object Oriented Weblog</description>
	<lastBuildDate>Sat, 07 Jan 2012 02:36:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Pramila</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-290</link>
		<dc:creator>Pramila</dc:creator>
		<pubDate>Mon, 19 Jul 2010 12:21:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-290</guid>
		<description>Helped me a lot to fix the problem I had. THX :)</description>
		<content:encoded><![CDATA[<p>Helped me a lot to fix the problem I had. THX <img src='http://www.factorypattern.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dev</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-289</link>
		<dc:creator>Dev</dc:creator>
		<pubDate>Wed, 16 Jun 2010 12:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-289</guid>
		<description>Thanks for the sort and sweet solution.</description>
		<content:encoded><![CDATA[<p>Thanks for the sort and sweet solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ciaran</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-287</link>
		<dc:creator>Ciaran</dc:creator>
		<pubDate>Thu, 06 May 2010 17:19:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-287</guid>
		<description>After I load the properties from the classpath I&#039;m getting the BOM characters ï»¿ appended to the start - meaning when I try and use getProperty() for my first property I get null returned - any ideas what I&#039;m doing wrong here??</description>
		<content:encoded><![CDATA[<p>After I load the properties from the classpath I&#8217;m getting the BOM characters ï»¿ appended to the start &#8211; meaning when I try and use getProperty() for my first property I get null returned &#8211; any ideas what I&#8217;m doing wrong here??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LATESH</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-286</link>
		<dc:creator>LATESH</dc:creator>
		<pubDate>Tue, 04 May 2010 17:22:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-286</guid>
		<description>import java.io.*;
import java.util.*;

public class WriteProperty{
  String str, key, val;
  public static void main(String[] args) {
    WriteProperty w = new WriteProperty();
  }
  public WriteProperty(){
    try{  
            int check=0;
            while(check == 0){
        check=1;
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        System.out.println(&quot;Enter file name which has properties extension:&quot;);
        str = bf.readLine();
        Properties pro = new Properties();
        File f = new File(str + &quot;.properties&quot;);
        if(!f.exists()){
          check=0;
          System.out.println(&quot;File not found!&quot;);
        }
        else{
          FileInputStream in = new FileInputStream(f);
          pro.load(in);
          System.out.print(&quot;Enter Key : &quot;);
          key = bf.readLine();
          System.out.print(&quot;Enter Value : &quot;);
          val = bf.readLine();
          pro.setProperty(key, val);
          pro.store(new FileOutputStream(str + &quot;.properties&quot;),null);
          System.out.println(&quot;Operation completly successfuly!&quot;);
        }
      }
    }
    catch(IOException e){
    System.out.println(e.getMessage());
    }
  }
}</description>
		<content:encoded><![CDATA[<p>import java.io.*;<br />
import java.util.*;</p>
<p>public class WriteProperty{<br />
  String str, key, val;<br />
  public static void main(String[] args) {<br />
    WriteProperty w = new WriteProperty();<br />
  }<br />
  public WriteProperty(){<br />
    try{<br />
            int check=0;<br />
            while(check == 0){<br />
        check=1;<br />
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));<br />
        System.out.println(&#8220;Enter file name which has properties extension:&#8221;);<br />
        str = bf.readLine();<br />
        Properties pro = new Properties();<br />
        File f = new File(str + &#8220;.properties&#8221;);<br />
        if(!f.exists()){<br />
          check=0;<br />
          System.out.println(&#8220;File not found!&#8221;);<br />
        }<br />
        else{<br />
          FileInputStream in = new FileInputStream(f);<br />
          pro.load(in);<br />
          System.out.print(&#8220;Enter Key : &#8220;);<br />
          key = bf.readLine();<br />
          System.out.print(&#8220;Enter Value : &#8220;);<br />
          val = bf.readLine();<br />
          pro.setProperty(key, val);<br />
          pro.store(new FileOutputStream(str + &#8220;.properties&#8221;),null);<br />
          System.out.println(&#8220;Operation completly successfuly!&#8221;);<br />
        }<br />
      }<br />
    }<br />
    catch(IOException e){<br />
    System.out.println(e.getMessage());<br />
    }<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nischal Shetty</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-282</link>
		<dc:creator>Nischal Shetty</dc:creator>
		<pubDate>Mon, 12 Apr 2010 07:16:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-282</guid>
		<description>Phew! that helped me, thnks a lot :)</description>
		<content:encoded><![CDATA[<p>Phew! that helped me, thnks a lot <img src='http://www.factorypattern.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kovid</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-279</link>
		<dc:creator>Kovid</dc:creator>
		<pubDate>Tue, 02 Mar 2010 17:33:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-279</guid>
		<description>I don&#039;t understand this. How do I create a .properties file? 
Its not making sense to me. Thanks in advance, 
Kovid</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand this. How do I create a .properties file?<br />
Its not making sense to me. Thanks in advance,<br />
Kovid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandeep</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-274</link>
		<dc:creator>Sandeep</dc:creator>
		<pubDate>Wed, 03 Feb 2010 02:57:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-274</guid>
		<description>Thank you very much,it helped me a lot</description>
		<content:encoded><![CDATA[<p>Thank you very much,it helped me a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John, the Fisherman</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-271</link>
		<dc:creator>John, the Fisherman</dc:creator>
		<pubDate>Mon, 11 Jan 2010 04:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-271</guid>
		<description>Saved my day! I was having problems trying to load the file using a relative path in my web app. Also, I did not remeber the existence of the Properties class.</description>
		<content:encoded><![CDATA[<p>Saved my day! I was having problems trying to load the file using a relative path in my web app. Also, I did not remeber the existence of the Properties class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ravil</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-266</link>
		<dc:creator>ravil</dc:creator>
		<pubDate>Thu, 10 Dec 2009 16:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-266</guid>
		<description>Thanks a lot for your brief instructions. The are very helpful!!</description>
		<content:encoded><![CDATA[<p>Thanks a lot for your brief instructions. The are very helpful!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ranganath</title>
		<link>http://www.factorypattern.com/how-to-readwrite-java-properties-files/comment-page-1/#comment-265</link>
		<dc:creator>ranganath</dc:creator>
		<pubDate>Thu, 10 Dec 2009 06:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.factorypattern.com/how-to-readwrite-java-properties-files/#comment-265</guid>
		<description>read worth.</description>
		<content:encoded><![CDATA[<p>read worth.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

