全局应用程序菜单是否支持 Java 应用程序?

全局应用程序菜单是否支持 Java 应用程序?

我是 Matlab 和 Maple 等 Java 应用程序的重度用户。全局菜单是否支持这些非常重要的软件包?

如果没有,有计划这样做吗?

答案1

目前这是一个打开错误

我建议订阅它以跟踪其进展。(如何订阅

答案2

您可以进行全局菜单集成任何基于 Java 的应用程序通过安装 Jayatana 来实现 JMenubar:

  • 复制此脚本
  • 将其保存在您的桌面或主目录中。
  • 打开终端,输入cd ~/
  • 再次输入:bash path_to_the_newly_saved_script
  • 按照说明进行操作(您需要互联网连接)。

    /bin/bash #!/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;
    

您可以在这篇文章中看到详细信息: Ubuntu 全局菜单支持 Java 应用程序


为了,这是不同的。ECLIPSE 包在库 libappmenu.so 中被列入黑名单,因为它与 Global Menu 的集成不知何故被破坏了(菜单有时会重复和混乱)。EMACS23 也是如此(使用全局菜单时不会显示动态菜单)。因此它们被列入黑名单,直到开发人员提供全局修复。

答案3

本线程中提到的已打开的错误是关于 Eclipse 的,它不使用许多 Java 应用程序使用的默认 Java GUI 工具包(Swing)(Eclipse 使用 SWT)。

因此,即使他们解决了这个特定的错误,我们可能也不会为 Java 应用程序提供 Unity 集成。

答案4

任何可以从命令行运行的命令都可以添加到菜单中。

全局菜单项可以在 /usr/share/menu 中找到。您应该能够通过编辑现有条目来添加新条目。

可以通过右键单击面板上的应用程序项来添加个人条目。

相关内容