Java 当-Xmx设置为超过1g时,分叉VM在没有正确告别的情况下终止

Java 当-Xmx设置为超过1g时,分叉VM在没有正确告别的情况下终止,java,maven,maven-surefire-plugin,Java,Maven,Maven Surefire Plugin,我正在学习一门课程,其中作业是使用Maven执行的,项目中提供了.pom文件。分配需要大约1.5gb的内存来处理。但是,当提供超过1gb的数据时,我会收到以下输出: [WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1 ExecutionException The forked VM terminated without properly saying goodbye. VM crash

我正在学习一门课程,其中作业是使用Maven执行的,项目中提供了.pom文件。分配需要大约1.5gb的内存来处理。但是,当提供超过1gb的数据时,我会收到以下输出:

[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1
ExecutionException The forked VM terminated without properly saying goodbye. VM 
crash or System.exit called?
Error occurred in starting fork, check output in log
转储内容如下:

Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream 
'Error occurred during initialization of VM'.
java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma 
after third character in command 'Error occurred during initialization of VM'.
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData.<init>(ForkClient.java:511)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkClient.java:209)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:176)
at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:88)
at java.lang.Thread.run(Thread.java:748)
通过直接写入分叉JVM 1中的本机流而损坏标准输出。流动
“VM初始化期间发生错误”。
java.lang.IllegalArgumentException:流stdin已损坏。预期逗号
在命令的第三个字符“VM初始化期间出错”之后。
位于org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData。(ForkClient.java:511)
位于org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkClient.java:209)
位于org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumerline(ForkClient.java:176)
位于org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:88)
运行(Thread.java:748)
所讨论的问题是:

<plugin>
                <!-- executes test with -Xmx option -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
                <configuration>
                    <forkCount>4</forkCount>
                    <reuseForks>true</reuseForks>
                    <argLine>-Xmx2048m</argLine>
                    <useSystemClassLoader>true</useSystemClassLoader>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>

org.apache.maven.plugins
maven surefire插件
2.22.0
4.
真的
-Xmx2048m
真的
真的

其中is-Xmx设置为1g/1024m以上,我遇到了上述问题。

您使用的是32位JVM吗?32位进程的容量不能超过1.5 Gb。使用64位Java。是的,我使用的是32位jdk=(很抱歉开始使用64位,因为32位时间已经过去了。。。