如何隐藏TieredCompilation警告? [英] How to hide TieredCompilation warning?
问题描述
我正在使用Linux Mint和OpenJDK. java -version
显示如下:
I'm using Linux Mint and OpenJDK. java -version
shows this:
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK Client VM (build 24.79-b02, mixed mode, sharing)
每当我运行基于Java的应用程序(如lein
)时,都会收到此警告:
Whenever I run a Java-based app like lein
, I get this warning:
OpenJDK Client VM warning: TieredCompilation is disabled in this release.
这与我的兴趣无关,所以我宁愿在命令输出中看不到它.如何隐藏或禁用它?
It's irrelevant to my interests, so I'd rather not see it in the command output. How can I hide or disable it?
推荐答案
问题出在Leiningen.它的默认安装在其安装的bash脚本中包含以下行(例如/usr/bin/lein
):
The problem is in Leiningen. Its default installation contains the following line in the bash script it installs (eg. /usr/bin/lein
):
export LEIN_JVM_OPTS="${LEIN_JVM_OPTS-"-XX:+TieredCompilation -XX:TieredStopAtLevel=1"}"
有两种选择:
- 将
+
更改为-
; - 完全注释掉该行.
- change
+
to-
; - comment out the line entirely.
选项2将更全面地禁用该警告.这是因为对于某些任务,Leiningen可执行文件(在~/.lein/self-installs
中)即使在-TieredCompilation
存在的情况下也将尝试启用它.
Option 2 will disable the warning more comprehensively. This is because for certain tasks the Leiningen executable (in ~/.lein/self-installs
) will try to enable it anyway even in presence of -TieredCompilation
.
这篇关于如何隐藏TieredCompilation警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!