Each time I run java
or javac
on terminal I get this annoying message
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
I looked up very location I know to find out where this variable in being set. I checked the following files.
~/.bashrc
~/.profile
~/.pam_enviornment
/etc/bash.bashrc
/etc/enviornment
/etc/profile.d/
Where else should I look and how to remove this?
Best Answer
This is because you have installed
jayatana
that enables global menu support for Java swing applications in Ubuntu. There are few ways of doing this:Option 1: Remove
jayatana
packageIf you do not need global menu support for Java swing applications, you can simply remove the package. Removing the package will not cause more harm than making menus of java swing based applications such as eclipse and intellij move back inside the window of the application.
Option 2: Remove only the annoying message
This will remove the auto-start configuration of Jayatana and you won't see the annoying message ever. Again, this will disable the global menu support of Java Swing applications.
If you want to still get enable the global menu support without getting the message, you can refer to this page. In summary:
For IntelliJ IDEA & Android Studio:
At the end of the opened file, add the following line and save the file.
For NetBeans:
Assuming NetBeans is installed in
/usr/local/netbeans-8.0.2
Search for
netbeans_default_options
in the opened file, and add the following statement at the end of the existing value (Notice that the options are separated by space) and close it.