How to fix the Eclipse executable launcher was unable to locate its companion shared library for windows 7? - eclipse

I am getting the following error, while launching Eclipse:
The eclipse executable launcher was unable to locate its companion shared library.
Previously Eclipse was working fine when I had jre6 installed on my pc. After installing jre7 update 25, I am no longer able to launch Eclipse.
My Eclipse ini-file has these lines:
-startup
plugins\org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
How do I fix this error? Any help would be great.

Had similar issue, which was a result of update. Please make sure that names of libraries mentioned in eclipse.ini and the actual names of these files on your disk match exactly.
-startup
plugins\org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
Here is the post that I used to fix this issue on my system http://codewithgeeks.blogspot.in/2013/11/fixing-eclipse-executable-launcher-was.html

It worked only after removing the eclipse folder and all related folders like .p2, .eclipse (in my case they are at different location where I have saved eclipse installer) etc. and after re-downloading the eclipse, it worked.

In my case, this error occurred because of windows 7 shortcuts. In windows we create shortcuts on desktop by using right click > send to > desktop. In my pc, there is no option for desktop, but there is one for "documents". I created the shortcuts there and then moved them to the desktop. Executing these shortcuts causes the error. Eclipse works fine when I run it directly from the folder where it is installed. I fixed it by using right click > create shortcut and then moving this shortcut to the desktop.

This is an issue with the 64 bit version of Kepler and windows7 in my case.
I downloaded the 32 bit and it worked immediately.

In my case I have moved plugins folder mistakenly to another folder while taking backup of my unnecessary projects.
Then while I was trying to run the eclipse.exe I was getting the error-
The Eclipse executable launcher was unable to locate its companion
shared library.
I have simply copied the plugins folder to eclipse root directory, and it was working fine for me.
If you have the folders backup in your computer then just copy and paste the folders on eclipse directory, you don't need to reinstall or change the ini file so far I realized.

This happened to me when deleting some Equinox package from my plugins directory, make sure this is not the case.

The reason to that might be the 2 lines in eclipse.ini
--launcher.library
C:\Users\UserName\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444
for my case the reason was admin privilages so I had to move the folder from the path specified in ini to my eclipse plugins and change path in ini to :
plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444

This worked for me
On the Zipped folder of the ADT you initially downloaded unzip and navigate to:
adt-bundle-windows-x86_64-20140702\eclipse\plugins
Copy all the executable jar files and paste them on the
C:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\eclipse\plugins
directory (or wherever your adt is located).
Any executable jar files missing in the plugin folder will be added. You should be able to launch eclipse

I encountered the similar problem after installing new software. In my case, the problem was solved by: (1) restoring .p2 subdirectory under my home directory; and (2) editing eclipse.init file to have the updated java directory.

In my case, i had copied a plugins folder into workspace from a collegue. Becaouse it was an unzipped folder, the structure was like 'pluginsfolder inside a plugins folder2 . so make sure that all the plugins are directly located under the toppest plugins folder at the workspace.

In my case eclipse.ini entry for --launcher.library was :
--launcher.library
C:\Users\UserName\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834
and on my machine 'C:\Users\UserName\.p2\' folder was missing hence installed the eclipse again which created the .p2 folder structure at required location and now I am able to login successfully.

I followed the below steps and it worked for me.
Step1:
Edit eclipse.ini by adding javaw.exe path and remove --launcher.appendVmargs line.
Below shows the original and edited file
Orginal eclipse.ini
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
After editing eclipse.ini:
openFile
-vm
C:/ProgramFiles/Java/javapath/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
Step2:
Copied the org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar to eclipse installation folder .
You can find the .jar location in eclipse.ini
eg : C:\Users\Username.p2\pool\plugins

Related

Limited Eclipse GUI: cannot drag windows

I had installed Eclipse 2020-03 mostly to program in Python with PyDev: everything worked fine. (In Ubuntu 16.04.7)
I updated to Eclipse IDE 2020-06 through Check for updates menu. Now I cannot move (drag and drop) the windows in the workbench, nor resize them by moving the separation between them. In this situation the utility of eclipse is extreme limited.
Do you have any insight on what to do to have full windows functionality on ECLIPSE? Thanks.
Conservative Solution
The fastest way to recover the lost functionality is to revert to the previous installation 2020-03.
It worked fine after correcting some problems with the eclipse.ini file, because the -startup and the --launcher.library entry in this file are wrong.
-startup entry: To find the right .jar file go to the folder plugins which is in the eclipse.ini directory (e.g., /opt/eclipse/2020-03/eclipse) and copy the right name in eclipse.ini (in my case the right .jar file was plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar)
--launcher.library entry: To find the right launcher write on terminal locate .equinox.launcher.gtk and take the newest version of the launcher, which is usually found in ~/.p2/pool/plugins/ (in my case the right launcher was ~/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1200.v20200508-1552 )
Sadly, this is not a full solution, because I have to give up the newest version 2020-06 :_(

No Java virtual machine was found (Eclipse)

When trying to run Eclipse Kepler (for the first time), I get the following error:
I am aware that this issue has been solved many times before. However, I have changed eclipse.ini to say -vm C:\Program Files (x86)\Java\jdk1.6.0_21\bin\javaw.exe but to no avail. The same error always comes up.
===UPDATE===
I added a line break after -vm and now I get this dialog box:
and the eclipse.ini file:
-vm
C:\Program Files (x86)\Java\jdk1.7.0_51\jre\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
The problem is that you are trying to start a 64 bit version of Eclipse with a 32 bit version of Java. The bitness should match. You can download 64 bit Java here
Start Eclipse with a 64 bit JVM and the problem will go away.
To do so:
eclipse.exe -vm c:\path\to\64\bit\bin\javaw.exe
You can also update the the first two lines in your eclipse.ini file to use the 64 bit java by default by doing the following:
-vm
c:\path\to\64\bit\bin\javaw.exe
(NOTE: be sure the argument and value each exist on a separate line)
Also, you can also download a 32 bit version of Eclipse for use with 32 bit Java. The key is that the bitness is the same.
You are pointing your 64-bit Eclipse at a 32-bit Java installation. They need to match. You can either get and use the equivalent 32-bit Eclipse download or make sure you install a 64-bit Java.
You were correct to place -vm and the path on separate lines in eclipse.ini. The error shown in your updated screen shot indicates that you're running 64-bit Eclipse on a 32-bit JDK, which doesn't work. The bit-ness of them have to match.
No need to open eclipse.ini, just follow the path its requesting to launch it ie....most jre folders have an added extension to the name eg. jre1.8.0_45, just cut that folder from java folder and paste in eclipse folder and delete the extension. It becomes just jre now launch eclipse it should work.
Can you try one of these?
(1) just copy the jre to the directory it asked.
(2) add the jvm path to system path, which is located under control panel -> system -> advanced -> environment variables.
Forgot this is Windows... quotes. I think you need to put it in quotes because there are spaces in the string. -vm "C:\Program Files (x86)\Java\jdk1.6.0_21\bin\javaw.exe"
instead of using "Program Files(x86)" in the path try using something like
C:\Progra~2\Java\jre7\bin\javaw.exe - for 32 Bit
C:\Progra~1\Java\jre7\bin\javaw.exe - for 64 bit
It worked for me
For people who have tried the above solutions, as I have, and despite ensuring the same bitness and giving the direct path etc. still failing to get it to work - here's what did it for me.
-vm
java\bin
I pointed to the bin folder and Eclipse found the file it wanted (whatever it was) automatically, so try that out.
Note: I put my jre in my Eclipse folder so the path is that short for me... basically, just try pointing to the bin folder instead of a specific file.
Run java.exe from C:Prgram Files...\bin. A cmd promt will be running. Just minimize it and then try running eclipse.exe. Worked for me
I am facing the same problem. I found that due to installation of JDK, I removed the path "C:\ProgramData\Oracle\Java\javapath" in the PATH environment variable that caused the problem. SO I added this path again and it works fine.
Two ways to work around this .
Recommended way : In your eclipse.ini file make sure you are pointing -vm to your jdk installation. More on this here .
Pass in the vm flag from command line. http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#Find_the_JVM
Note : Eclipse DOES NOT consult the JAVA_HOME environment variable.
I fixed by changing the version of jre version in the file: Eclipse.ini (Path: C:\Users\"your_system_name"\eclipse\java-oxygen\eclipse)
In the Eclipse.ini file you should be able to see the line (-vm
C:/Program Files/Java/jre1.8.0_111/bin) change the path to new version (-vm
C:/Program Files/Java/jre1.8.0_161/bin).
Save & Launch the Eclipse.
It worked for me!
Got same issue to day. Java updated to jre1.8.0_171 earlier this morning. There is not a VM line in the eclipse.ini file at all so the typical answer did not work. Was running from shortcut created several weeks ago. Deleted shortcut for Eclipse (Oxygen) and created new shortcut that pointed directly to the the executable and problem went away. Cannot explain why this solution worked but it did.
open - >
C:\Users\userName\eclipse\jee-2020-03\eclipse - eclipse.ini
find javaw.exe -> C:\Program Files\Java\jre1.8.0_261\bin
if Javaw.exe is present (2) in the given Path then copy the path like
C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe
paste inside eclipse.ini after just after -vm
example:
-vm C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe
then open eclips.exe
For this error, I struggled a lot and found this solution which will work definitely and it's very easy way.
this is the error I got. If you notice, there is path which it is unable to find, which is JDK/jre folder. So just copy "jre" folder in JDK and paste it inside "eclipse" folder, as below:
Try Restarting eclipse, it will start. Thanks!!!

eclipse won't start - no java virtual machine was found

Eclipse was running fine yesterday (and has been since I installed it about a year ago). Now all the sudden I'm getting the following error on startup:
"A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
C:\Program Files\eclipse\jre\bin\javaw.exe
javaw.exe in your current PATH"
I have not changed anyhing Eclipse/Java related on my machine but a Windows update was applied to my machine yesterday, so maybe that has something to do with it (but I don't see anything that would affect Java). I've looked at all the other posts about adding something to your PATH or adding the -vm option to the Eclipse ini (couldn't get this to work) or copying the jre folder to eclipse\jre (this worked but doesn't seem like a good long term solution). So I'm really trying to figure out how to get things back to the "default" setup without messing stuff up.
I'm running Windows 7, Eclipse Helios and Java 1.6.0_26.
Two ways to work around this .
Recommended way : In your eclipse.ini file make sure you are
pointing -vm to your jdk installation. More on this here. Make sure to add -vm before the -vmargs section.
Pass in the vm flag from command line. http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#Find_the_JVM
Note : Eclipse DOES NOT consult the JAVA_HOME environment variable.
Make sure both the Java version and Eclipse are belongs to same architecture.So install 64 bit java for 64 bit eclipse.
eclipse.ini:
--launcher.defaultAction
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize<br/>
256m
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll<br/>
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.7
That worked for me. It doesnt have to be on the beginning, but surely it cant be at the end of the file.
In my case i had few things missing. I didnt install JDK and JRE of 64 bit while eclipse was of 64 bit version. Once done and JDK\bin path was set in PATH variable eclipse worked fine :)
Open eclipse.ini file besides eclipse.exe
paste
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll
//find it if you are having another JDK version.
on first line. And you are good to go.
I had same problem after updating java.
Then I paste
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
to show the path of javaw.exe in eclipse.ini file.
Hope this will help you.
After setting Java Path, if you are not able to open your eclipse do below steps:
Go to your Eclipse Folder where you have extracted your eclipse.
Open Eclipse file in notepad (by default it will open on notepad)
Enter two lines
-vm
C:/Program Files/Java/jdk-11.0.2/bin/javaw.exe
jdk-11.0.2 ,It should be your Java Version, which you will get by the above location.
I had the same problem. I my case it was a program i've install that had destroyed the PATH env variable.
so check your PATH environment variable.
First
check if you have both java 32 and 64 bit install then
Setting Path on Windows
Windows 8
Drag the Mouse pointer to the Right bottom corner of the screen
Click on the Search icon and type: Control Panel
Click on -> Control Panel -> System -> Advanced
Click on Environment Variables, under System Variables, find PATH, and click on it.
In the Edit windows, modify PATH by adding the location of the class to the value for PATH, Or simply make sure that the variable name is in ALL CAPS
If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
Close the window.
Reopen Command prompt window, and run your java code.
Via Puppet ATG installation Centos.
ERROR:
No Java virtual machine could be found from your PATH
SOLUTION:
Declear variable :
$java_home="/opt/oracle/product/java/jdk1.8.0_45/bin"
Add This "{$java_home}" Java Exec
require common, java
Exec {
path => [ "${java_home}", "/usr/bin", "/bin", "/usr/sbin", "${temp_directory}"]
}
On Centos 7 I fixed this problem (after a big yum upgrade) by changing my setting for vm in:
~/eclipse/java-oxygen/eclipse/eclipse.ini
to:
-vm
/etc/alternatives/jre/bin
(which will always point to the latest installed java)
If Eclipse isn't finding your JRE/JDK or finding the wrong version, add the following two lines to the beginning of your eclipse.ini file:
-vm
[your-path-to-java-executable]
Try downloading and installing 32-bit version of Java, and then setting the path :)
Yeah it happend to me right now. Go to Oracle site, and search for Java SDK. Make sure you use the same architeture (x86, x64) of Eclipse.
This happened to me also. And I found the javaw.exe in C:\Windows\System32 got deleted after the windows update. Copied one more time and Eclipse started all fine.
Chek os,eclipse,and java whether it is 32 or 64 bit
you can also copy your JRE folder to eclipse directory and it will work corectly
The problem occurred on my machine due to Java version got updated(66 from 60). Pay special attention to it. As said above would like to add
In this file eclipse.ini, which is available where you have installed eclipse search for the line below -vm example
C:\Program Files\Java\jre1.8.0_66\bin
now try to open this location, in case you are not able to open, that means there is some problem. In my case the version installed was jre1.8.0_60 . So there was a small difference which may not noticeable(66 instead of 60). Update it you will be able to open.
I came across same issue y'day, with PATH etc configured correctly.
It can be opened from command line, just now working by a double click.
And it was working now, by just "Run as administrator" :)
Some time this happens when your Java folder get updated.
Open Eclipse folder and search file eclipse.ini.
Open the eclipse.ini file and check whether jre version is same as jre available in your java folder.
I faced same problem when my jre got changed from jre1.8.0_101 to jre1.8.0_111.
C:\Program Files\Java\jre1.8.0_101\bin
to
C:\Program Files\Java\jre1.8.0_111\bin
In my case the problem was that the path was enclosed in quotation marks ("):
-vm
"C:\Program Files\Java\jdk1.8.0_25\bin"
Removing them fixed the problem:
-vm
C:\Program Files\Java\jdk1.8.0_25\bin
My solution is Include JDK's "bin" Directory in the PATH
To edit the PATH environment variable in Windows 7/8/10:
Launch "Control Panel" ⇒ (Optional) System and Security ⇒ System ⇒ Click "Advanced system settings" on the left pane.
Switch to "Advanced" tab ⇒ Push "Environment Variables" button.
Under "System Variables" (the bottom pane), scroll down to select "Path" ⇒ Click "Edit...".
Copy the JDK bin directory from JAVA folder and paste to "Edit..."
you should change the jdk path in eclipse.ini here:
/Users/you_username/eclipse/jee-photon/Eclipse.app/Contents/Eclipse/eclipse.ini
after you should restart eclipse :)

Running Eclipse on desktop = can't find companion library

I just downloaded Eclipse Juno onto my machine. I extracted the files to an Eclipse subdirectory in "C:\Program Files". When I try to launch eclipse from here, it works great! But I don't want to have to navigate to this directory every time I want to launch eclipse. I tried just moving the executable to my Desktop, but then when I try to run it I get this message:
The eclipse executable launcher was unable to locate its companion library.
How do I let eclipse know where it's companion library is if I don't plan to have them in the same folder? Please be very specific.
Thanks!
You dont move the executable to your desktop because the executable needs to be in the same directory with other files where it was. get it back and then make a shortcut or link to it. you are free to make the shortcut or link where you want.
Well i had the same problem sometime back, and i figured out that since i've changed the location of my elcipse.exe , it has some how effected the "eclipse.ini " file
1.Path to -startup
D:\ < elcipse folder> elcipse:\ plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar \this is the start up jar file.
2.Path to shared lucher library
D:\ < elcipse folder> elcipse:\ org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813 \this is the shared launcher library jar file.
just set the follwing two paths and ti will start up again like befor..
Happy coding..
This is a bug filed with Eclipse for Windows and Mac:
When attempting to launch Eclipse (double click on Eclipse.app), the launch fails. The only action is a dialog box with this message:' the eclipse executable launcher was unable to locate its companion shared library'. I found an online description of the problem and the workaround here:
Specifically, as per the instructions above:
I opened the Eclipse.app package, located eclipse.ini, edited it
searched the plugins folder for something matching org.eclipse.equinox.launcher.carbon.
copied the maching folder name (from plugins)
pasted it as the terminating portion of the path for --launcher.library
replaced the --launcher.library line with that path
https://bugs.eclipse.org/bugs/show_bug.cgi?id=288112
Eclipse Neon, 2017:
I copied my old .p2 folder found in my home.
Ran eclipse again and it worked.
It used to be that you could just copy eclipse as a zip and it would work fine, but it seems some plugins now rely on the .p2 folder.

Move default config folder of eclipse

When Eclipse first start, it creates some config files and folders on my hard drive (contains information about work-space ...etc...). I don't like the position it creates config files because config files are all put in my C:\Users\Long folder and that's ugly. I want to put all those config files somewhere else (C:\Eclipse\ for example). This happens in Linux too.
Do you know how to put those files in somewhere else?
Just add the following to your eclipse.ini file (found at the root eclipse installation folder):
-Dosgi.configuration.area=file:/C:/Workspace/.eclipse
To change the default .eclipse folder location, go to ${eclipse.home}, open your eclipse.ini with a text editor and insert there one line more:
-Dosgi.configuration.area=/path_to_new_folder_location/.eclipse/
As someone already said, adding the property -Dosgi.configuration.area in the eclipse.ini file does the trick.
But in my opinion it would be better to rely on the user.home variable and set the destination like for the other variables.
Example with -Dosgi.instance.area.default:
-Dosgi.instance.area.default=#user.home/eclipse-workspace
In my case I just wanted another destination than the default #user.home/.eclipse which was still used by the Eclipse Mars that I keep for old projects and I just defined:
-Dosgi.configuration.area=#user.home/.eclipse-oygen-3
to have a specific destination for the Eclipse Oxygen 3 installation.
Note that syntax works for both Windows and Linux (I did not tested on OSX, but I guess it should).
Eclipse has some command line arguments you can use. One of those arguments is the flag -data which tells Eclipse where the workspace of Eclipse should be located.
So when I create a new workspace, I normally create a shortcut under Windows (or script file under Linux) with the following contents:
eclipse.exe -vm <JDK>\bin\javaw.exe" -data ws -nl en
This defines which JDK should be used, that the workspace is located under ws and that the english locale should be used.
IMHO parameter -configuration does the trick. It must point to a subdirectory named "config". Eclipse will fill this and the upper directory itself with files, e.g. for a JBoss server installation.
If you have more than one eclipse installation, then you should use a different directory for each eclipse installation.
Example how to keep everything in defined places:
"C:\Program Files (x86)\eclipse\eclipse48jee\eclipse.exe" -nl en_US -vm "C:\Program Files (x86)\Java\jdk1.8.0_212\bin" -configuration C:\EclipseData\eclipse48jee\config -data C:\Workspaces\SomeProject