My method System.getProperty("line.separator")
is not working in Apache server but seems to work in local Eclipse .
Actual implementation
str2=str1.replace(System.getProperty("line.separator"), "CH(50)");
The code works in eclipse but not in server and "line.separator is not replaced by CH(50).
line.seperator : Sequence used by operating system to separate lines in text files
System.getProperty("line.seperator")
is operating system dependent.
Your server may be Linux and you are testing it locally in windows
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.