3

I downloaded Eclipse Juno package, and extracted it to /opt directory. For installing it, I followed the steps given in this site - Ubuntu Help under the User Installation section. I created the opt_eclipse.desktop file in /usr/share/applications/ directory. Here is the content of my desktop file:

[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=eclipse
Exec=eclipse42
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse
X-Desktop-File-Install-Version=0.20

Then I installed the desktop file on Unity using the following command, as given in this post:

sudo desktop-file-install /usr/share/applications/opt_eclipse.desktop

Then I created the symbolic link using the below command:

sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse42

I also moved the icon to the pixmaps folder using the below command:

cp opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm

Now, when I go to Unity, I can find the Eclipse Icon. But, when I click it, nothing happens. It doesn't get started. I'm completely new to Ubuntu. Did I miss something out there?

1

2 Answers 2

2

Did you also install the jdk, it is needed for eclipse.

Enter the full path to the start-script in the Desktop-file

Exec=/path/to/ecplipse/eclipse42

if the path is noch included in your $PATH-Variable, what normally should note be if you did not by yourself.

10
  • Do we need to give the path till the executables in the Exec or till the startup script? And how to see what is there in my $PATH variable. Do I need to add the path to JDK there?
    – Rohit Jain
    Jun 13, 2013 at 19:09
  • I installed jdk using - sudo apt-get install openjdk-7-jdk.
    – Rohit Jain
    Jun 13, 2013 at 19:10
  • if you install jdk by software-center/apt you do not need to add it. to show your $PATH type in terminal: echo $PATH
    – herrhansen
    Jun 13, 2013 at 19:11
  • by the way, it is not needed to eclipse-path to $PATH to get eclipse running
    – herrhansen
    Jun 13, 2013 at 19:12
  • the Exec-Path on my machine looks this way: /home/christian/apps/eclipse/eclipse this is the file to be called in Desktop-file
    – herrhansen
    Jun 13, 2013 at 19:15
1

I think you need JAVA Runtime Environment installed. Did you try running eclipse directly by clicking binary?

13
  • I have already installed the JRE. Also, when I run eclipse directly from startup script stored in ~/bin/eclipse, it is running.
    – Rohit Jain
    Jun 13, 2013 at 19:00
  • It is also running from the binary.
    – Rohit Jain
    Jun 13, 2013 at 19:01
  • So probably there's something wrong with links i think. How about giving the full path to binary file as Exec option?
    – Misery
    Jun 13, 2013 at 19:03
  • Do you mean symbolic links? What might be the problem? I don't know, I just followed the steps on the other posts.
    – Rohit Jain
    Jun 13, 2013 at 19:04
  • 1
    Yes it works. Thanks @Misery. Actually, the problem was with symlinks. (As you said earlier). I wrote the solutions in the comments of first answer. Thanks for helping. :)
    – Rohit Jain
    Jun 13, 2013 at 19:41

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