3

I downloaded the eclipse from its site. And extracted in home folder. For the first time when I opened it, it worked fine. Then I locked it to launcher. Now it's not starting when I click on launcher icon in eclipse but it starts when I start it from the folder where I extracted it. Please tell some way to keep it in launchcer and open it from t here only.

Thanks.

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Java - SnapdealOMS/src/main/java/com/snapdeal/oms/admin/web/controller/ReloadCacheController.java - Eclipse 
Icon=eclipse.png
Path=/home/nakulkumar/Downloads/eclipse
Exec=/usr/bin/java -Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar /home/nakulkumar/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -data /home/nakulkumar/Snapdeal_workspace -os linux -ws gtk -arch x86_64 -showsplash /home/nakulkumar/Downloads/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925-0400/splash.bmp -launcher /home/nakulkumar/Downloads/eclipse/eclipse -name Eclipse --launcher.library /home/nakulkumar/Downloads/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326/eclipse_1605.so -startup /home/nakulkumar/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar --launcher.appendVmargs -exitdata 34000f -product org.eclipse.epp.package.java.product -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar /home/nakulkumar/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
StartupNotify=false
StartupWMClass=Eclipse
OnlyShowIn=Unity;
X-UnityGenerated=true
  • You must have an old(er) .desktop file, probably in ~/.local/share/applications, linking to the wrong directory/executable. – Jacob Vlijm Feb 6 '15 at 10:47
  • What should I do now? – coder005 Feb 6 '15 at 10:56
  • Could you tell me how you installed it? Did you install another version before (and how was that one installed/uninstalled) – Jacob Vlijm Feb 6 '15 at 11:32
  • No other version was installed just using another workspace. Now it neither switching to another workspace nor starting. Just extarcted to home hoolder and started using it. – coder005 Feb 6 '15 at 11:54
  • AHA, could you run gedit ~/.local/share/applications/eclipse.desktop and post what is in the line staring withExec=? – Jacob Vlijm Feb 6 '15 at 12:08
3

Normally, When you run Eclipse from a downloaded version, it should create a correct .desktop file in ~/.local/share/applications on first run.

In this case, for some reason, some lines were messed up:

  • The Exec= -line should simply show the path to your executable.
  • The Name= -line obviously went (terribly) wrong as well

How to fix

Just replace:

  • The line starting with Exec= by:

    Exec=/path/to/your/eclipse_executable
    

    (most likely, looking at your Path= -line, it should be: Exec=/home/nakulkumar/Downloads/eclipse/eclipse)

  • The line starting with Name= by:

    Name=Java - Eclipse
    

As a comparison, this is the .desktop file Eclipse created on my system:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Java - Eclipse 
Icon=eclipse
Path=/home/jacob/eclipse
Exec=/home/jacob/eclipse/eclipse
StartupNotify=false
StartupWMClass=Eclipse
OnlyShowIn=Unity;
X-UnityGenerated=true
  • @coder005 Glad it worked out! – Jacob Vlijm Feb 6 '15 at 19:23
  • It doesn't look like eclipse created a .desktop file for me, what is the name of the file, or can I just make my own and name it whatever I want? – MasterHD Mar 25 '17 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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