Skip to content
Advertisement

How to create properties without white spaces between separator using org.apache.commons.configuration.PropertiesConfiguration?

Need to write a properties file using org.apache.commons.configuration.PropertiesConfiguration and it should have a format like variablename=variablevalue without having whitespaces between the separator. Is there a way to achieve that using apache commons-configuration?

My current implementation :

JavaScript

Result :

JavaScript

Expected Result :

JavaScript

Advertisement

Answer

Docs are here: https://commons.apache.org/proper/commons-configuration/userguide_v1.10/howto_properties.html

Untested but I imagine this does it:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement