跑步 java -XshowSettings:vm -version
给予:
VM settings:
Max. Heap Size (Estimated): 247.50M
Using VM: OpenJDK 64-Bit Server VM
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
但它被印在了stderr上。我才不管呢 -version
,但如何打印 -XshowSettings:vm
去stdout?
我查了密码https://github.com/adoptopenjdk/openjdk-jdk11/blob/master/src/java.base/share/classes/sun/launcher/launcherhelper.java#l152 此函数有一个选项: printToStderr
上面写着: printToStderr: choose between stdout and stderr
但我不知道如何从命令行设置它?
谢谢。
暂无答案!
目前还没有任何答案,快来回答吧!