12

I just upgraded to 15.04 and noticed that on any Java program launched, the message

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar

is printed to the console (which did not happen before the upgrade). Googling it only taught me what a Java Agent is. Now:

  • Why does this message appear?
  • Does anybody else observe this?
  • Can it be disabled?
3

4 Answers 4

4

This PPA is to get Unity AppMenu and HUD support for applications like NetBeans IDE, IntelliJ IDEA, Android Studio etc., as described here. So, unless you want this you can delete the package using sudo apt-get remove jayatana (and as the stackoverflow thread suggests, removing /usr/share/upstart/sessions/jayatana.conf and restarting your computer). I am not sure if this is by default installed by 15.04 because it is not listed in the author's repo.

3

Why does this message appear?

Apparently it's reporting that the environment variable JAVA_TOOLS_OPTIONS has been set.

Does anybody else observe this?

Yes, I see it and am annoyed by it as well.

Can it be disabled?

A couple of sites suggest uninstalling jayatana, but I'm reluctant to do that since I don't really know why Ubuntu installed it in the most recent release.

1
  • That's exactly my knowledge and opinion on this so far, too. Please let me know if you find out anything more! Apr 29, 2015 at 6:47
3

If you just want to remove the message you can just edit your $HOME/.bashrc (if using bash) or $HOME/.profile and unset the variable with:

unset JAVA_TOOL_OPTIONS

This way jayatana will still be there and can just be enabled again if you remove the unset JAVA_TOOL_OPTIONS from your .bashrc / .profile.

Note unsetting the variable is NOT equivalent to setting it to null. If you set it to null as follows you will still see a message when running any java based application:

JAVA_TOOL_OPTIONS=

1
  • Using JAVA_TOOL_OPTIONS= does not set to null but to the empty string. Jun 4, 2015 at 7:47
1

This is because of Jayatana, which is added to Ubuntu 15.04 in order to enable global menu for Java Swing applications. You can safely remove this message by entering the following command in a terminal. This command will remove the auto-start configuration of Jayatana.

sudo rm /usr/share/upstart/sessions/jayatana.conf

However, removing this option will disable the global menu support of Java Swing applications like Netbeans, IntelliJ IDEA. I have shared my workaround to suppress the message without losing the global menu in this article: Global Menu Support for Java Applications

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .