Java Swing Ayatana is a project that brings Ubuntu global menu (AppMenu) and HUD support for Java Swing applications.
JAyatana version 2 was released recently, getting support for Ubuntu 13.10 along with a PPA for easy installation. Even though there are no packages for Ubuntu 14.04 yet, Java Ayatana also works with the latest Ubuntu Trusty Tahr.
Using this, you'll get Unity AppMenu and HUD support for applications such as: NetBeans IDE, IntelliJ IDEA, Android Studio, jDownloader and so on.
Here's an IntelliJ IDEA screenshot using a global menu under Unity (Ubuntu 14.04):
And Netbeans IDE:
And of course, HUD works too:
Note that this won't work for Eclipse because it's a SWT application. If you want Unity AppMenu / HUD support for Eclipse IDE, see the instructions HERE for Ubuntu 13.04 and older or, for Ubuntu 14.04, use the new unity-gtk-module dconf option to whitelist Eclipse. Unfortunately the old method to enable the Eclipse AppMenu doesn't work properly in Ubuntu 13.10.
Get global menu / HUD support for Java Swing applications using Java Ayatana
Java Swing Ayatana is available in a PPA for Ubuntu 13.10. Add the PPA and install it using the following commands:
sudo add-apt-repository ppa:danjaredg/jayatana sudo apt-get update sudo apt-get install jayatana
If you want to use this in Ubuntu 14.04 (there are no packages for it right now), after adding the PPA, edit the PPA source file and replace "trusty" with "saucy" and you'll be able to install JAyatana. Use the commands below to do all of this and install JAyatana in Ubuntu Trusty:
sudo add-apt-repository ppa:danjaredg/jayatana sudo sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/danjaredg-jayatana-*.list sudo apt-get update sudo apt-get install jayatana
Once installed, log out and log back in.
Unfortunately the latest JAyatana 2.x which is available in the PPA is not compatible with Ubuntu versions older than 13.10.
If you want to checkout the source, report bugs and so on, see the Java Swing Ayatana page @ Google Code.
How to rever the changes
1. Because files in /etc/ are only removed when the package that installs them is purged, to revert the changes you'll have to purge the packages installed from the PPA using the following command:
sudo apt-get --purge remove jayatana libjayatana libjayatanaag libjayatana-java libjayatanaag-java
If you didn't read the removal instructions above and didn't purge the packages, you can run the above command again, even if the packages are already removed or simply remove the jayatana.sh script from /etc/profile.d/:
sudo rm /etc/profile.d/jayatana.sh
2. And finally, log out and log back in.
seen @ +Bademus l.