How to hide TieredCompilation warning?

末鹿安然 提交于 2019-12-23 09:25:57

问题


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)

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?


回答1:


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"}"

There are two options:

  1. change + to -;
  2. comment out the line entirely.

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.



来源:https://stackoverflow.com/questions/32445748/how-to-hide-tieredcompilation-warning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!