抑制“Picked up _JAVA_OPTIONS”信息 [英] Suppressing the "Picked up _JAVA_OPTIONS" message
问题描述
我正在使用_JAVA_OPTIONS为RHEL上的Java设置一些默认值。它工作正常,但现在我每次启动java时都收到以下消息
I'm using _JAVA_OPTIONS to set some defaults for Java on RHEL. It works fine but now every time I start java I get the following message
选择_JAVA_OPTIONS:-foo -bar -baz
Picked up _JAVA_OPTIONS: -foo -bar -baz
是否可以保留选项但是禁止显示此消息。
is it possible to keep the options but suppress the display of this message.
推荐答案
查看相关的源代码(在openjdk中的arguments.cpp,第2492行),无法控制此消息的输出。
From looking at the relevant source code (arguments.cpp in openjdk, line 2492), there is no way to control the output of this message.
我唯一能说的是打印到 stderr
。所以你可以包装你的命令来将 stderr
重定向到 / dev / null
(如果没有其他你关心的话)关于 stderr
)。
The only thing I could say is that it is printed to stderr
. So you could wrap your commands to redirect stderr
to /dev/null
(if there wasn't anything else you cared about on stderr
).
- 或写一个
java
过滤掉此消息的包装脚本。 - 或者向openjdk项目提交功能请求,但这不能解决您的问题。
- Or write a
java
wrapper script which filtered out this message. - Or submit a feature request to the openjdk project, although this won't solve your immediate problem.
这篇关于抑制“Picked up _JAVA_OPTIONS”信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!