I have a simple GUI that pops up and asks the user to enter a couple of fields. One of the fields is for a configuration path. I take what the user entered in the GUI (a JTextField), save that to a String and use the Apache Commons Configuration library (I'm using PropertiesConfiguration.setProperty() ) to update a .properties file based on what the user entered. The problem is this is not working due to how the characters are escaped. If the user enters in:
\:cust\:authprocessor
Then I want that exact string to be updated in the properties file so that it looks like this:
path = \:cust\:authprocessor
Instead, it looks like this:
path = \\:cust\\:authprocessor
I've tried using String.replace(), but that does not work since they are escaped. Any ideas on how to handle?