[英]Java System.getProperty(“line.separator”) not working in apache server
My method System.getProperty("line.separator")
is not working in Apache server but seems to work in local Eclipse . 我的方法
System.getProperty("line.separator")
在Apache服务器中不起作用,但似乎在本地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). 代码在eclipse中工作,但在服务器中不工作,“line.separator不会被CH(50)替换。
line.seperator : Sequence used by operating system to separate lines in text files line.seperator :操作系统用于分隔文本文件中的行的序列
System.getProperty("line.seperator")
is operating system dependent. System.getProperty("line.seperator")
依赖于操作系统。
Your server may be Linux and you are testing it locally in windows 您的服务器可能是Linux,您正在Windows中本地测试它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.