I want to write data in properties file using java.I am able to write the data in file by using java,but i am getting comments like date and time everytime by default.
Please anyone suggest how to avoid or remove comments in the proeprties file using java
Here is my code:
File file = new File("C:/Software/app.properties");
Properties properties = new Properties();
FileOutputStream fileOut = new FileOutputStream(file, true);
properties.setProperty(""+data.split(Constants.DATA_SPLIT)[1]+"", value);
properties.store(fileOut, null);
fileOut.close();
My o/p is O/put is:
#Wed Jun 04 13:23:54 IST 2014 CurrnerURL=J;SLDAJGLLASJGKPJ #Wed Jun 04 13:25:54 IST 2014 CurrnerURL=J;SLDAJGLLASJGKPJ
I dont want comment session in file. Please suggest me.