Eclipse fails to start due to missing companion shared library

Published by Tobias Hofmann on

2 min read

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”.

Root Cause

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:

C:\Users\<User Name\.p2

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.

Solution

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.

Recommendation

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.

Let the world know
Categories: Technology

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.

1 Comment

Harsh · March 22, 2023 at 12:50

OMG it worked, I have been trying for dayss just to solve this error. nothing worked but this actually worked. Thanks Alot…

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.