Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppressing the "Picked up _JAVA_OPTIONS" message [closed]

Tags:

java

rhel

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

Picked up _JAVA_OPTIONS: -foo -bar -baz

is it possible to keep the options but suppress the display of this message.

like image 259
Carcophan Avatar asked Jul 27 '12 07:07

Carcophan


People also ask

What is picked up _JAVA_OPTIONS?

The message "Picked up _JAVA_OPTIONS" implies that the Java runtime has found this setting in your environment variables. The solution depends on which operating system you are running.

How do I get rid of Java options?

From the Start Buttong, search for System, then launch "System" from your search results. In the new window, select Advanced System Settings. A new window will open, select the Advanced tab, then click on the Environment button. In this new window, select _Java_Options, in the user variables and then click on Delete.

What is _JAVA_OPTIONS in environment variable?

The _JAVA_OPTIONS is an environment variable that you can use to pass the Java options to a JVM process. The passed Java options are treated similarly to the command line arguments by the Java Virtual Machine.


1 Answers

From looking at the relevant source code (arguments.cpp in openjdk, line 2492), there is no way to control the output of this message.

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).

  • 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.
like image 177
jtahlborn Avatar answered Oct 12 '22 11:10

jtahlborn