How to avoid curly braces in my properties file that is extracted using the ResourceBundle API

In the properties file, I have key=A: {{0}, {1}}, B: {{2}, {3}} . I expect the string "A: {0, 1}, B: {1, 2}" . The numbers inside curly braces are processed. How to include the symbol '{' without reference to any value? I also tried to run away from the character like this "// {". Even I could not get the expected result. Error java.lang.IllegalArgumentException: Unable to parse argument 0, 1 \.

+6
java resourcebundle
source share
2 answers
 key=A: '{'{0}, {1}'}', B: '{'{2}, {3}'}' 
+5
source share

just run the properties file using the native2ascii tool that comes with the JDK. It will work for you. Or is it better to use JRCEditor

+2
source share

All Articles