Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

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?

share|improve this question
    
this link worked for me: askubuntu.com/a/80016 > you need to specify the correct path for icon and eclipse. –  Shambhavi Jan 13 at 5:18
add comment

marked as duplicate by Eliah Kagan, Eric Carvalho, BuZZ-dEE, Aditya, mikewhatever Jan 13 at 18:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
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 –  quidage Jun 13 '13 at 19:11
    
by the way, it is not needed to eclipse-path to $PATH to get eclipse running –  quidage 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 –  quidage Jun 13 '13 at 19:15
show 5 more comments

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

share|improve this answer
    
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 '13 at 19:00
    
It is also running from the binary. –  Rohit Jain Jun 13 '13 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 '13 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 '13 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 '13 at 19:41
show 8 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.