Is it possible to continue a long string on the next line in a Java properties file?
e.g., somehow
myStr=Hello
World
and when I get getProperty("myStr") it will return with “Hello World”?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A backslash at the end of a line lets you break across multiple lines, and whitespace that starts a line is ignored:
Note: the backslash needs to be at the very end of the line; it must be the last character, no spaces after it, etc.
The Java docs put it this way: