3

Upgraded from 14.04 LTS to 16.04 LTS but my Eclipse is not getting launched from the launcher on the side vertical bar. Giving me this error: The Eclipse executable launcher was unable to locate its companion shared library. enter image description here

Reinstalling is not fixing the issue.

Was referring to this thread but it seems there is not some easy way to get the launcher(the correct version of launcher) to get this issue fixed.

Moreover if i follow this link also why the same launcher is able to invoke eclipse when we do this from command line Vs ICON?

I am having Oracle JDK8 and using the installer to install Eclipse for Java EE Developers.

This is how my eclipse install directory looks like

root@ashu-700-430qe:/opt/eclipse/jee-mars/eclipse# ls -lrt
total 236
-rwxr-xr-x  1 root root 140566 Feb 12 16:55 icon.xpm
-rwxr-xr-x  1 root root  79058 Feb 12 16:55 eclipse
drwxr-xr-x  2 root root   4096 May 29 11:44 readme
drwxr-xr-x  2 root root   4096 May 29 11:44 dropins
-rw-r--r--  1 root root    798 May 29 11:44 eclipse.ini
drwxr-xr-x 11 root root   4096 May 29 12:37 configuration

This is how my eclipse.ini looks like for the launcher

-startup
../../../../root/.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../../../../root/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-install
/opt/eclipse/jee-mars/eclipse
-vm
/usr/lib/jvm/java-8-oracle/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/

and this is how the eclipse.desktop looks like

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/jee-mars/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/jee-mars/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
X-Desktop-File-Install-Version=0.22

Please help.

1
  • This short way might be worked. Go to eclipse installed place then right click eclipse icon and select " Make link". Then drag and drop created Link icon where you want. Then double click it to launch. Thanks, Sandaruwan.
    – Sandaruwan
    Feb 6, 2018 at 11:31

4 Answers 4

9

It's a permissions issue. You can either reinstall the package without sudo rights or change the permissions of /root/.p2 with

sudo chmod 775 -R /root/

I did the latter.

1
  • thanks man.... you just save my life... thank you so much Apr 30, 2018 at 10:01
0

Also on CentOS the same issue, now in 2019. As splucena said above, changing permissions on the p2 folder --- under the extracted files --- to 775 and then running the install script did the trick, and I could run eclipse ok for all users.

As for the eclipse.desktop file, The entry below worked ok, with the application going into the 'Programming' category. Yes, Category=Development ends into programming, Category=Programming end in Other :)

[Desktop Entry]
Type=Application
Comment=Eclipse is an IDE for C, C++ and Java development
Name=Eclipse 2019-03
Exec=/usr/local/eclipse/eclipse
Icon=/usr/local/eclipse/icon.xpm
Categories=Development;
0

As already suggested in the answer from splucena, you can edit the permissions of /root/.p2 That worked pretty well for me.

What I would simply add is that you don't necessarily need to add read and execute permissions to everyone in that folder for this to work.

You can just add those permissions to your specific user, by using ACL (access-control list):

# setfacl -R -m u:youruser:rx /root

To check ACL permissions were set properly:

# getfacl /root
0

Same problem with Eclipse 2022-03.

As other users have mentioned, the problem is about the .p2/ directory. When the installer is run as root, it puts that in the /root directory. You might mess with permissions. It is inappropriate for non-root users to be writing in the /root directory.

The .p2/ directory has to do with "bundle pools". The way I read it, this technology is a bandage on other bandages, an attempt to mitigate file bloat problems caused by previous poor choices. Don't know for sure.

But you can turn the .p2 stuff off in the installer.

Menu --> Advanced Mode
"Bundle Pool" is the path of the .p2/ directory.
The field is not editable.
It can be un-checked, though. Proceed.

Eclipse Projects: you will probably need one of

CDT C development toolkit
JDT Java development toolkit

In last panel, set "Root Install Folder" to /opt, "Installation folder name" to eclipse.

You will have to "trust" some stuff, I guess.

In the last pane, un-check "Launch automatically". Otherwise, it launches eclipse as root, without so much as a by-your-leave.

But then, eclipse does run for normal users. (You have to install the desktop menu icons yourself, but it isn't hard.)

You must log in to answer this question.

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