"Raised JAVA_TOOL_OPTIONS: -javaagent: /usr/share/java/jayatanaag.jar" when starting the Scala interpreter

When I launch the Scala interpreter on Ubuntu 14.04, I get the following message printed as the first line:

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

The following is the familiar β€œWelcome to Scala” message.

I am worried because I have not seen this when starting Scala before - what does it mean, dangerous, etc.?

Apparently, the environment variable $JAVA_TOOL_OPTIONS set to -javaagent:/usr/share/java/jayatanaag.jar - I did not set this, but what and why? Can I safely disable it?

Additional Information:

  • recently installed Android Studio
  • The word "ayatana" in the JAR name may refer to the Ubuntu Ayatana project
+42
java scala ubuntu
Sep 27 '14 at 12:00
source share
6 answers

You can disable jayatana only for the current shell session by disabling JAVA_TOOL_OPTIONS as follows:

 unset JAVA_TOOL_OPTIONS 

Thus, it will still be enabled for applications that need it.

+28
May 12 '15 at 9:45
source share

This happens if you installed jayatana, which allows the hidden global menu in eclipse to work with Unity:

 sudo add-apt-repository ppa:danjaredg/jayatana sudo apt-get update sudo apt-get install jayatana 

which places the JAR in the /usr/share/java/ folder, which the JVM repeats at startup.

If you uninstall this software, you will not see a message:

 sudo apt-get remove jayatana 

You may need to remove:

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

and restart the session so that the JAVA_TOOL_OPTIONS environment JAVA_TOOL_OPTIONS not set.

+27
Oct 08 '14 at 5:26
source share

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

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

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

+6
Aug 03 '15 at 7:07
source share

On Windows, set JAVA_TOOL_OPTIONS =

Setting to null will remove from the environment.

+2
Jun 10 '15 at 16:57
source share

If you do not want to delete anything, you can create a keystore from the terminal:

 keytool -keystore clientkeystore -genkey -alias anyalias 

(you have to create it from an older project)

And then in Android Studio, click Build-> Generate Signed APK and select the created keystore.

0
Sep 13 '15 at 5:54
source share

If you are using Windows, go into environment variables and delete or set the JAVA_TOOL_OPTIONS variable to zero.

0
Feb 13 '16 at 9:19
source share



All Articles