aspose file tools*
The moose likes I/O and Streams and the fly likes how to write into an ini file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how to write into an ini file" Watch "how to write into an ini file" New topic
Author

how to write into an ini file

keshav reddy
Greenhorn

Joined: May 11, 2007
Posts: 13
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
Bartender

Joined: Oct 14, 2005
Posts: 18159
    
    8

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
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
That's what the ini4j library does.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to write into an ini file
 
Similar Threads
Write into a file in a Map format
including ini file in project
how to read .ini file from java code
Updated an ini file in Java
reading the configurtation file divided in the sections