升级到Ubuntu 13.10后,当我点击Eclipse中的任何菜单(帮助、窗口、运行)时,它们都不会显示。只有菜单存根和选择可见。
我尝试安装新的4.3,同样的事情发生了。其他人有这种经历吗?
升级到Ubuntu 13.10后,当我点击Eclipse中的任何菜单(帮助、窗口、运行)时,它们都不会显示。只有菜单存根和选择可见。
我尝试安装新的4.3,同样的事情发生了。其他人有这种经历吗?
当前回答
同样的问题也在askubuntu上发布了(我也回答了):
Eclipse菜单被切断或不显示
这里是完整的答案。
如何解决Ubuntu 13.10中的Eclipse菜单问题
(稳定的方式,直到有人修复bug)
该方法假定您已经拥有eclipse.desktop文件(或者您可以从头创建一个新的文件)。否则,你可以暂时看看下面的“快速方法”。
Open your eclipse.desktop file: sudo -H gedit /usr/share/applications/eclipse.desktop (If you can't find it in this path, try in ~/.local/share/applications/eclipse.desktop. Otherwise, you could have to find yours using locate command). Replace the Exec= line with this: Exec=env UBUNTU_MENUPROXY= eclipse Where "eclipse" is the path to your eclipse executable. In this case it's just "eclipse" since there's a symlink in /usr/bin folder. NOTE: If you can't find your eclipse.desktop file, you can simply create one from scratch in the above path, and fill it with these lines: [Desktop Entry] Type=Application Name=Eclipse Icon=eclipse Exec=env UBUNTU_MENUPROXY= eclipse Terminal=false Categories=Development;IDE;Java; Save the file.
现在您可以像往常一样从Eclipse的图标运行Eclipse。
(快速但重复的方式)
如果你没有任何Eclipse .desktop文件,并且你现在不想创建它,你可以简单地运行Eclipse,使用下面的命令:
UBUNTU_MENUPROXY= eclipse
其中“eclipse”是eclipse可执行文件的路径。注意,这只是运行一次Eclipse的最快方式。如果您不想记住这个命令并在每次必须运行Eclipse时使用它,请遵循上面的“稳定方式”。
来源:
Keenformatics -如何在Ubuntu 13.10中显示Eclipse菜单 Ubuntu文档-环境变量 Eclipse菜单不会在Saucy中显示
其他回答
如果已经启动eclipse应用程序,请关闭eclipse。
在终端上输入这个命令
$ sudo gedit /usr/share/applications/eclipse.desktop
注意:您可能会在此路径下找到Eclipse .desktop文件..../usr/share/applications/Eclipse
在这个文件中添加这些行。
[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
#Exec=/home/USERNAME/Dokument/eclipse/eclipse
Exec=env UBUNTU_MENUPROXY=0 /home/ashish123/adt-bundle-linux-x86-20140702/eclipse/eclipse
Icon=/home/ashish123/adt-bundle-linux-x86-20140702/eclipse/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application
直到我在我的主文件夹的.profile文件中添加了以下一行并重新启动了我的计算机,我才开始工作。
export UBUNTU_MENUPROXY=0
这对我很管用。
1)首先,关闭eclipse并这样做:
sudo gedit /usr/share/applications/eclipse.desktop
2)在这个文件的末尾复制粘贴这一行
Exec=env UBUNTU_MENUPROXY=0 /your/path/to/eclipse/binary
打开eclipse, eclipse的菜单将开始显示。 (适用于Ubuntu 12.04版本后)
如果我没有这样的文件:
/usr/share/applications / eclipse.desktop
我猜你有这个文件,如果你从ubuntu仓库安装eclipse的话。
如果您安装一个独立的eclipse,那么该文件并不重要。那边没有这样的文件。
我在Ubuntu 13.10的64位Eclipse Kepler上也遇到了同样的禁用子菜单问题。但我最终设法让它运行与以下小工作周围。这个错误实际上已经在这个链接中报告过了。
在/usr/share/applications/目录下创建一个eclipse.desktop文件,包含以下内容。
[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/eclipse/eclipse
Icon=/home/USERNAME/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application
或者,您也可以尝试使用下面的可执行bash脚本文件来打开Eclipse。将文件放在/bin目录或/usr/local/bin目录下。
#!/bin/bash
export UBUNTU_MENUPROXY=0
path_to/eclipse/eclipse