I defined a .properties file with properties like this
A=Hello World this is a dummy text
B=Bye Bye World I am leaving to mars
I am able to read it properly after loading resource from input stream and display them good.
Now i want to define these properties like this
A= Hello World
this is a
dummy text
B= Bye Bye World
I am leaving to
mars
However it don’t load it as expected
A as Hello World
and
B as Bye Bye World.
Do i have to go by myself defining a regex and read this and fill it in a map.
Or is there any way default available in Properties.java?
You need to add a
\nand then end the line with the “continuation” character:\Note that leading whitespace is trimmed when loading the Properties file. So you need to add that to the end of the previous line if you need indented lines: