Eclipse fails to start due to missing companion shared library
Recently my ABAP Developer Tools in Eclipse (ADT) stopped working. Well, not ADT failed to start. Eclipse failed to start. All I got was an error message when I tried to start Eclipse: “The Eclipse executable launcher was unable to locate is companion shared library”.
Judging from the error message, Eclipse was trying to load some shared library and failed. There was no hint on how to solve this, or an Eclipse tool that helps to fix the error. Google was also not a great help. I looked at the configuration file eclipse.ini. There were references to a .p2 directory in my home location:
I checked the folder and found out that folder was empty. Maybe a cleanup task thought the files can be deleted? I do not know why, but there were no files in it. That was the root cause of the error. Obviously, Eclipse cannot start when libraries are missing.
I had installed Eclipse via the installer. The installer places some files into the target directory you specify for Eclipse, but also stores several files needed in the directory .p2 in your home folder. If these required files are deleted, a new installation is necessary. This is basically the only way to solve this. As the workspace for the projects is not altered by reinstalling Eclipse, no project work should be lost or affected.
When you use the all-in-one zip file where you simply unzip Eclipse to a directory, the p2 folder is part of the folder structure.
Using the zip installation of Eclipse means that all needed files are placed into the same location. This should make it less likely to get some files deleted that are stored in another location. It also means that you can simply share your Eclipse installation without having to install it. After adding ADT to Eclipse, the libraries are in the plugins folder.
Zip the parent eclipse folder and you can take your ADT with you.