Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java字符串在Unix上被拆分_Java_Linux_String_Unix - Fatal编程技术网

Java字符串在Unix上被拆分

Java字符串在Unix上被拆分,java,linux,string,unix,Java,Linux,String,Unix,我正在使用字符串生成器创建字符串消息 StringBuilder outputMessage = new StringBuilder("<env:Envelope xsi:schemaLocation=\"OTC_Matching_FX_1-0 /xmls/OTC/OTC_Matching_FX_1-0.xsd http://schemas.xmlsoap.org/soap/envelope/ /xmls/OTC/soap-envelope.xsd http://www.

我正在使用字符串生成器创建字符串消息

StringBuilder outputMessage = new StringBuilder("<env:Envelope xsi:schemaLocation=\"OTC_Matching_FX_1-0       /xmls/OTC/OTC_Matching_FX_1-0.xsd  http://schemas.xmlsoap.org/soap/envelope/  /xmls/OTC/soap-envelope.xsd  http://www.fpml.org/FpML-5/confirmation    /xmls/OTC/fpml-main-5-1.xsd\" xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:fpml=\"http://www.fpml.org/FpML-5/confirmation\" xmlns:mtc=\"OTC_Matching_FX_1-0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
这是Unix上的输出:


我无法理解为什么会发生这种情况。为什么字符串在字符之间被分割?

您是否尝试过不使用StringBuilder<代码>字符串s=新字符串(“您的文本”)?实际上,我需要将许多其他字符串附加到此字符串,因此使用StringBuilder您是否尝试使用
System.out.println(outputMessage.toString())
?它是如何输出字符串的?是的,它以相同的方式打印字符串。但仅在unix上,在ide内部,它可以在单行上打印。您是否尝试过在文本查看器中禁用换行功能?
LOGGER.info("Output: "+outputMessage.toString());