commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Koncilia" <Christian.Konci...@panoratio.de>
Subject Commons Configuration: delete entry
Date Mon, 07 Aug 2006 06:56:12 GMT
Hello everybody,

I have a question regarding the Commons Configuration. Let's assume I
have a configuration file "myprops.properties" that looks like this:

>-------------------------
# written by PropertiesConfiguration
# Mon Aug 07 08:29:12 CEST 2006

group1.entry1 = value1
group1.entry2 = value2
group1.entry3 = value3
>-------------------------

Now I would like to simply delete an entry. For instance, I would like
to remove the whole line "group1.entry2 = value2" from my properties
file. How do I do this?

Using

  PropertiesConfiguration config = 
            new PropertiesConfiguration("myprops.properties");
  config.clearProperty("group1.entry2 = value2");
  config.save();

doesn't work. 

Thanks for your help!

Bye
    Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message