Setting Java VM line.separator

前端 未结 3 1782
清酒与你
清酒与你 2020-12-01 18:14

Has anybody found a way how to specify the Java line.separator property on VM startup? I was thinking of something like this:

java -Dline.separa         


        
3条回答
  •  醉话见心
    2020-12-01 19:12

    I wouldn't do that if I were you. The line-separator is platform specific, and should remain so. If you want to write windows-only or linux-only files, define a UNIX_LINE_SEPARATOR constant somewhere and use it instead.

提交回复
热议问题