Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide TieredCompilation warning?

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?

like image 412
Arry Avatar asked Sep 07 '15 20:09

Arry


1 Answers

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.

like image 69
Arry Avatar answered Oct 24 '22 15:10

Arry