Q:

Message on each startup of Java after upgrade to 15.04

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? 

A:

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. 

A:

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. 

A:

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=

