MenuBar not working for eclipse in Ubuntu

MenuBar not working for eclipse in Ubuntu

I upgrade my ubuntu from 13.04 to 13.10 but in 13.10 eclipse menubar is not working properly.
In Unity there is one flag : UBUNTU_MENUPROXY, This is environment variable in ubuntu.
Default value of this flag is 1. Check default value in your PC by typing below command in terminal

omt@omt:~$ echo $UBUNTU_MENUPROXY

Here UBUNTU_MENUPROXY = 1 means menubar will display in main ubuntu panel (Taskbar) like Mac OS.
UBUNTU_MENUPROXY = 0 means menubar will display in application like Windows OS.

So for eclipse UBUNTU_MENUPROXY = 1 is not working. I will tell you how to fix this issue.

There is two way to fix this issue QUICK and PERMANENT(Using Application Launcher (.desktop file)).

1. Quick Solution :

Open terminal type following command to fix this issue.

omt@omt:~$ export UBUNTU_MENUPROXY=0
omt@omt:~$ echo $UBUNTU_MENUPROXY
omt@omt:~$ ./omtLab/eclipse_IDE/eclipse

Here we are changing environment variable (UBUNTU_MENUPROXY) value to 0.
And then running eclipse from same terminal. It will open all menu inside eclipse.

NOTE : This is quick solution you need to do it every time to open your eclipse with inside menu.

2. PERMANENT(Using Application Launcher (.desktop file)).

In Unity there is a launcher left side with application icons. We are going to create our custom launcher for eclipse, It will open our eclipse with (UBUNTU_MENUPROXY = 0).

To create custom launcher in Unity Ubuntu you need to create .desktop file in /home/.local/share/applications.

NOTE : Here .local is a hidden folder to show hidden folder in Ubuntu type Ctrl+H.

Create new eclipse.desktop file in /home/.local/share/applications.

If you not found [applications] folder then create new one.

Copy below text in eclipse.desktop

[Desktop Entry]
Name=Omt Eclipse
Exec=env UBUNTU_MENUPROXY= /home/omt/omtLab/eclipse_IDE/eclipse

Here Icon=/home/omt/omtLab/eclipse_IDE/icon.xpm is my eclipse icon path in eclipse_IDE folder.
Exec=env UBUNTU_MENUPROXY= /home/omt/omtLab/eclipse_IDE/eclipse is my eclipse application launcher path.

Save this file and Drag N Drop it in Left Launcher panel.

Click it to run eclipse.