Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to write into an ini file  RSS feed

 
keshav reddy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In a project I have a requirement of writing into ini (windows specific) files. Can you please give me some details how i can write the new "sectionname", "key","value" into an ini file.
I think by using setproperty method we can update the value of existing key, but how can I write the new key- value in an ini file.


Thanks,
Keshav
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't be the first person to have that requirement, or even the ten-thousandth person. I suggest googling for somebody who has already done an ini-maintainer in Java.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what the ini4j library does.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!