5

I am a heavy user of Java applications such as Matlab and Maple. Will the global menu support these very important packages?

If not, are there plans to do this?

1

5 Answers 5

3

This is currently an open bug.

I recommend subscribing to it to follow its progress. (How to subscribe)

4
  • Great, subscribed to it. Shoud I make a comment about my problem or would it just annoy the developers?
    – Ingo
    Jan 25, 2011 at 15:31
  • Click the "Affects me" near the top, this is the equivalent of leaving a comment that it's important to you without sending bug mail to hundreds of people. Jan 25, 2011 at 15:33
  • Any news on this Jorge?
    – Ingo
    Jan 5, 2012 at 16:44
  • @Ingo it's in the bug report. Jan 5, 2012 at 16:46
1

You can have global menu integration for any Java based application that implements a JMenubar by installing Jayatana:

  • Copy this script
  • Save it in your Desktop or Home directory .
  • Open a terminal, type cd ~/
  • Type again: bash path_to_the_newly_saved_script
  • Follow instructions (You need an internet connection).

    #!/bin/bash

    # ----------------------------------------------
    # Author: [email protected]
    # Before executing this script make sure 
    # you're in your home directory `cd $HOME`
    #--------------------------------------------------
    
    # -------------------------------------NOTICE------------
    # APPLICABLE ONLY IN UBUNTU UNITY 
    # This script installs Jayatana for your JDKs 
    # It supposes you already have set your JAVA_HOME in ~/.bashrc
    # You will be prompted to choose which JDK to set as Default 
    # (choose the corresponding index).
    # In case you already installed jayatana and want to re-install, 
    # please uninstall then install again.
    # ------------------------------------------------------
    
    # -------------------------------------LICENSE--------------------
    #Licensed under the GNU LGPL, Version 3.0 (the "License");
    # you may not use this file except in compliance with the License
    # ----------------------------------------------------------------
    
    #JDKPATH=`echo $JAVA_HOME | sed -e 's/bash://g' | sed -e 's/Is a directory//g'`
    #JDKPATH=eval "echo $JAVA_HOME"
    JDKPATH=`echo $JAVA_HOME | grep [^*]`
    USERHOME=`echo $HOME`
    JAYATANADD="http://java-swing-ayatana.googlecode.com/svn/tags/1.2.4/jayatana"
    
    # INSTALL 
    INSTALLCOM () {
    sudo apt-get -y install openjdk-7-jdk libunity-dev libxt-dev gcc make ant subversion 
    sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 
    svn checkout $JAYATANADD 
    sudo ant install -buildfile $USERHOME/jayatana/build.xml -v
    sudo ant config -v 
    sudo update-alternatives --config java 
    sudo update-alternatives --config javac
    sudo ant install -Djava.home.7=/usr/lib/jvm/java-7-openjdk-amd64 -f $USERHOME/jayatana/build.xml -v -l $USERHOME/Desktop/jayatana-stall.log
    sudo ant config -Djava.home.7=$JDKPATH -f ~/jayatana/build.xml -v -l $USERHOME/Desktop/jayatana-stall.log
    }
    
    # UNINSTALL
    UNINSTALLCOM (){
    sudo ant deinstall -buildfile $USERHOME/jayatana/build.xml -v
    sudo ant deconfig -buildfile $USERHOME/jayatana/build.xml -v
    sudo ant deconfig -Djava.home.7=$JDKPATH -f $USERHOME/jayatana/build.xml -v -l $USERHOME/Desktop/jayatana-stall.log
    }
    
    # DELETE Jayatana Folder created by subversion checkout
    UNDIR() {
    read -p "Delete Jayatana Folder too? Enter ( y ) to delete or ( n ) otherwise : " choice
    if [ "$choice" = "y" ]; then mv $HOME/jayatana $HOME/.local/share/Trash/files/
    elif [ "$option" = "n" ]; then echo"Jayatana Folder is kept by $USER";
    echo "you can delete it later : ~/jayatana";
    else echo "Jayatana Folder is kept by $USER , you can delete it later : ~/jayatana";
    fi
    }
    
    # COMMON
    COMMON() {
    echo "$JDKPATH : is your default JDK. Version: " 
    echo `java -version`
    }
    eval COMMON;
    read -p "Enter ( i ) to install or ( u ) to uninstall : " option
    if [ "$option" = "i" ]; then eval INSTALLCOM
    elif [ "$option" = "u" ]; then eval UNINSTALLCOM;eval UNDIR;
    else echo "Aborted by $USER";
    fi
    exit 0;
    

You can see detailed information in this post: Ubuntu Global Menu Support for Java Applications


For ECLIPSE, this is different. The package ECLIPSE is blacklisted in the library libappmenu.so because its integration with Global Menu is somehow broken (menus are sometimes dupmlicated and disordered). Same goes for EMACS23 (Dynamic menus do not appear when using global menu). So they're blacklisted, until developers provide a global fix.

2
  • 1
    Wow, this is amazing. Thanks! Any idea whether the Ubuntu developers are aware of this?
    – Ingo
    Jan 6, 2013 at 11:13
  • Yeah. They are aware of it.
    – Hanynowsky
    Jan 9, 2013 at 21:52
1

The opened bug mentioned in this thread is about Eclipse, which doesn't use the default Java GUI toolkit (Swing) used by many Java applications (Eclipse uses SWT).

So, we probably are going to have no Unity integration for Java applications even if they solve that specific bug.

1
1

There is a program called java-swing-ayatana that supports this. I'm not sure if it works with every java application. But it now has a PPA install so it's pretty easy.

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

You may need to restart your session after this.

0

Any command which can be run from the command line can be added to the menu.

Global menu items can be found in /usr/share/menu. You should be able to add new entries by editing an existing entry.

Personal entries can be be added by right clicking on the Applications item on the panel.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .