Open Text File to Edit

Hi!

I have Java application where I wanted to allow user to make changes in configuration file (text file). Can I open Microsoft Notepad from My Java Application and make the changes/save the files?

[211 byte] By [PiyushDesaia] at [2007-11-27 10:33:58]
# 1

> Hi!

> I have Java application where I wanted to allow user

> to make changes in configuration file (text file).

> Can I open Microsoft Notepad from My Java

> Application and make the changes/save the files?

Yes you can, but I wouldn't recommend such an approach. Try using a properties file instead:

http://java.sun.com/docs/books/tutorial/essential/environment/properties.html

or if you have an other format (other than key-value based) for you configuration file, just use java's io package to manipulate the data:

http://java.sun.com/docs/books/tutorial/essential/io/

Good luck.

prometheuzza at 2007-7-28 18:25:55 > top of Java-index,Core,Core APIs...