Showing posts with label jayatana. Show all posts
Showing posts with label jayatana. Show all posts

Tuesday, October 6, 2015

Ubuntu 15.04 To Get Global Menu And HUD Support By Default For Java Swing Applications

Quick Ubuntu 15.04 Vivid Vervet update:  JAyatana was uploaded to the main Ubuntu 15.04 repositories today (moved from proposed to release) and according to the changelog, it will probably be installed by default:

Drop dependency on java, so that we can integrate this package by default without dragging java on the default installed (as we did in the past with qt appmenu integration).

Update: JAyatana is now installed by default in Ubuntu 15.04 Vivid Vervet.

Java Swing Ayatana (JAyatana) is a project that integrates Java Swing applications with Ubuntu's global menu (AppMenu) and HUD.

Using it, you get Unity AppMenu and HUD support for applications such as NetBeans IDE, IntelliJ IDEA, Android Studio, jDownloader and so on.

Here are a couple of screenshots of a Java Swing app (Android Studio) with global menu / HUD, under Unity:

Jayatana global menu java ubuntu


If you want to try JAyatana in Ubuntu 15.04 Vivid Vervet right now, install it from the repositories (note that the package was just promoted to release so it might take a while until it's synchronized with the repositories mirror you're using):
sudo apt-get install jayatana
Then log out and log back in.

Ubuntu 14.04 and 14.10 users can install Jayatana by using its official PPA.
Read more »

Ubuntu 15.10 And 15.04 Update Disables JAyatana (Global Menu And HUD For Java Swing Applications) By Default

JAyatana

JAyatana is a project that integrates Java Swing applications (such as NetBeans IDE, IntelliJ IDEA, Android Studio, jDownloader and so on) with Ubuntu's global menu and HUD.

Starting with Ubuntu 15.04, JAyatana was installed by default and it was configured to allow all Java Swing applications to use Ubuntu's global menu and HUD. This was changed yesterday when JAyatana was updated to no longer export the JAVA_TOOL_OPTION session file, meaning that Ubuntu no longer supports HUD or global menu for Java Swing applications by default.

This change affects both Ubuntu 15.10 and 15.04 (though for Ubuntu 15.04, this update is still in the proposed repository).

The reason behind the change is that by enabling JAyatana globally, each time you run a Java application, this would be displayed in the output:
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
And this breaks some programs that are running "java -version" and grep the output.

If this doesn't affect the applications you're using, you can re-enable JAyatana globally, by creating a file called "jayatana.conf" under /usr/share/upstart/sessions/ and paste this in the file:
description "Java Ayatana"

start on starting dbus

script
initctl set-env --global JAVA_TOOL_OPTIONS="-javaagent:/usr/share/java/jayatanaag.jar $JAVA_TOOL_OPTIONS"
end script
Then save the file, restart the session and Unity's global menu and HUD should work again for Java Swing applications.

You can also enable it on a per-program basis, by adding the following line in the program start script, etc.:
JAVA_TOOL_OPTIONS="-javaagent:/usr/share/java/jayatanaag.jar $JAVA_TOOL_OPTIONS"
Read more »