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?

Rohit Jain
  • 877
  • 2
  • 8
  • 15
  • this link worked for me: http://askubuntu.com/a/80016 > you need to specify the correct path for icon and eclipse. – Shambhavi Jan 13 '14 at 05:18

2 Answers2

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.

herrhansen
  • 251
  • 1
  • 6
  • 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 '13 at 19:09
  • I installed jdk using - `sudo apt-get install openjdk-7-jdk`. – Rohit Jain Jun 13 '13 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 '13 at 19:11
  • by the way, it is not needed to eclipse-path to $PATH to get eclipse running – herrhansen Jun 13 '13 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 '13 at 19:15
  • Yeah this is what I'm giving. My path is: `/opt/eclipse/eclipse` – Rohit Jain Jun 13 '13 at 19:17
  • Are you able to start eclipse in terminal by typing `eclipse42`? – herrhansen Jun 13 '13 at 19:22
  • No. Command not found. :( – Rohit Jain Jun 13 '13 at 19:24
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/9234/discussion-between-quidage-and-rohit-jain) – herrhansen Jun 13 '13 at 19:25
  • Thank you so much. Seems like the problem was with symlinks. I created the symlinks to `/opt/eclipse/eclipse`, whereas I installed eclipse in my home directory. Once I changed the symlinks to `~/opt/eclipse/eclipse`, it worked. Thanks for pointing me to that direction. And now I now one more think, RED color with symlinks means - PROBLEM. :) – Rohit Jain Jun 13 '13 at 19:40
1

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

Misery
  • 3,474
  • 4
  • 27
  • 32