No Java virtual machine was found (Eclipse) - 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!!!

Related

Eclipse neon, stopped with exit code=-1073740791

I'm trying to reinstall eclipse and add:
-vm C:\Program Files\Java\jre1.8.0_121\bin\javaw.exe.
See Image.
Please try the rules for specifying the virtual machine for eclipse as found here:
Note the format of the -vm option - it is important to be exact:
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
The -vm option must occur after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
Experiencing the same problem here, running Eclipse Neon.2 and JRE 1.8.0_121 on MS Windows 10.
If I specify a JVM in eclipse.ini (putting the -vm option and the javaw.exe pathname on separate lines in the right position, as Carlos Heuberger correctly suggests), eclipse crashes at startup with exit code=-1073740791, before opening the interface, but after initializing the workspace.
If I run Eclipse again, the interface opens and I can start working, but it is likely to crash after a while, apparently in a random way.
If I remove the -vm option from eclipse.ini and set JAVA_HOME and PATH in the environment, Eclipse seems to work fine; of course, this might cause problems to other applications on your system.
I think I eventually found the solution to the problem: the eclipse.ini file coming with the distribution has the JVM option -Dosgi.requiredJavaVersion=1.8 duplicated: simply remove the second instance and it will work like a charm!

How to run Eclipse with different Java version?

I am using Eclipse for developing BlackBerry Applications. I have JDK/JRE 7 currently on my computer, but that makes the BlackBerry plugins crash. Actually is a known issue and the only thing need to be done is run Eclipse with JDK/JRE 6 instead of 7.
I downloaded and installed version 6. However I am pretty sure Eclipse still uses 7. I had the same problem a year ago and I remembered I had to configure some System Variables and it worked, but I can't really find the solution now.
Any idea on this one? Important! I don't want to compile in version 6, which means I just have to choose the Java version through Eclipse. What I need is Eclipse to start with version 6.
Open eclipse config file eclipse.ini in your Eclipse folder.
Add -vm yourPath\Java\jre6\bin\javaw.exe like:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vm
C:\Java\jre6\bin\javaw.exe
...
If the path contains spaces there is no need to escape them, see the Eclipse Wiki for more specs. The -vm option and the path must be on separate lines. The -vm option must come before the -vmargs option. On Linux, the path would typically be /bin/java instead of the Windows path shown above. You must use the Java and Eclipse versions must match (i.e. 32-bit Eclipse runs on 32-bit Java and 64-bit Eclipse runs on 64-bit Java).
Note that option -vm C:\Java\jre6\bin\javaw.exe should be right before -vmargs. Otherwise you'll get 'Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit'
Do this:
1. Go to the folder where eclipse is installed (the one that has the eclipse.exe program in)
2. Open the text file eclipse.ini with notepad or something similar
3. Add the following lines to specify the JVM location using the -vm argument
-vm
c:/jre/bin/javaw.exe
Now start eclipse in the usual way.
Make sure to position the -vm argument before -vmargs, since the latter is passed to the VM on startup it will be too late to set the VM after this.
More info is available on the Eclipse wiki
You could also have changed the system path as per one of the other answers but this would change the JVM being used for the whole system. If you use the eclipse.ini settings it allows everything else to use the latest JVM.
Many hints given already. Anyway I will just provide the recommended way of doing it which might help for future reviews of that question:
Use the eclispe.ini file (folder where the eclipse binary resides)
Add the -vm option with the path of the jre to startup with
i.e Windows
-vm
C:\Java\jdk1.6.0_45\jre\bin\javaw.exe
i.e Linux
-vm
/opt/sun-jdk-1.6.0.02/bin/java
The -vm option must occur after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
see: the eclipse.ini authoring guidelines from eclipse wiki
Since none of the answers worked for me this is my solution:
I downloaded java 6 and i installed it. Then in the program files , inside the folder of java , i copied the folder jre6. I pasted it inside the eclipse folder and renamed it jre.
Thats it! When inside the eclipse installation folder your have a folder named jre , then the java in there is the java that eclipse will run with.
Thank you all for your answers!
These two options worked for me on Windows:
Edit eclipse.ini
-vm
C:/Java/jdk1.7.0_71/jre/bin
-vmargs
...
Copy jre folder to eclipse folder.
So after the copy I have C:\eclipse\jre folder which is a copy of C:\Java\jdk1.7.0_71\jre
If you want to make sure you are running you java apps in Windows 7 with an specific java version:
1 - Check out what which version is running by default. Run cmd to go to the console and type: java -version
C:>java -version
java version "1.6.0_45" Java(TM) SE Runtime Environment (build
1.6.0_45-b06) Java HotSpot(TM) Client VM (build 20.45-b01, mixed mode, sharing)
2 - Change the default jdk by changing the path. Example here. Make sure you java.exe from your desired jdk is before any other java.exe from any other JDK in the path.
ex. in JDK 1.6 you java.exe should be here C:\java\jdk1.6\bin\java.exe.
Once you have changed the path, open a new console and verify again which jdk version you are running.
3 - Make sure in eclipse.ini param -vm another jre version is not set.
I modified eclipse.ini file as follows (added my local JDK path) and it fixed eclipse loading issue.
-vm
C:\Program Files\Java\jdk1.8.0_251\bin
I too faced same issue while running eclipse with different version then default on the system.
I created a symlink of required jre directory under eclipse directory and then it was all working.
For windows user: symlink is similar to creating shortcut
Hope it helps you too.

Starting Eclipse results in Failed to create Java Virtual Machine

When starting eclipse.exe it gives and error message
Failed to create Java Virtual Machine
When I click eclipsec.exe then eclipse starts. What is the difference between eclipse.exe and eclipsec.exe?
Why eclipse.exe is not working now which was working yesterday?
What will be impact if I use eclipsec.exe to start eclipse?
Open eclipse.ini file and
Change the vmargs sizes to
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
It works on my system.
1.Open folder with Eclipse.exe and find eclipse.ini file
2.Replace -vmargs
by your current real path of javaw.exe:
-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”
3.save .ini file and open eclipse. It will work.. happy coding.
When I click eclipsec.exe then eclipse starts. What is the difference
between eclipse.exe and eclipsec.exe?
from eclipse wiki
You can start Eclipse by running eclipse.exe on Windows or eclipse on
other platforms. This small launcher essentially finds and loads the
JVM. On Windows, the eclipsec.exe console executable can be used for
improved command line behavior.
meaning the eclipse.exe find the JVM for you and starts Eclipse IDE , Where as the eclipsec.exe is console exe where you can tweak how eclipse starts
What will be impact if I use eclipsec.exe to start eclipse. It give
command prompt also.
No impact as such, eclipsec.exe is for windows only
In your eclipse.ini file
Add -vm C:\Program Files\Java\jre7\bin\javaw
below the line -Dosgi.requiredJavaVersion=1.6
And then remove 256m which is below the line --launcher.XXMaxPermSize.
It will work.
Adding following line in .ini solved the same reported issue in my machine.
-vm {path}\javaw.exe
Example: "-vm C:\Program Files\Java\jre7\bin\javaw.exe"
Write like below in .ini file and than it will work properly:
-vm
C:\Java\jdk1.6.0_25\bin\javax.exe
Added above line in eclipse.ini file(on the top) and worked for me. C:\Java\jdk1.6.0_25\bin This path can be changed as per your system.
Hope this will help someone.

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 :)

JVM terminated. Exit code = -1

I've been using Eclipse for some time already, and I didn't have any problems with it. However, when I tried to generate some javadoc, I found that I didn't have the SDK installed. I installed jdk 6u23, and from then on, Eclipse hasn't been working.
At first it told me it couldn't find a JRE/SDK. After copying and placing the JRE in the Eclipse folder, the error changed to this:
I've searched around for some solutions, and found a few of varying nature. However, none of them seemed to work.
I've tried emptying my eclipse.ini file without success.
Altering some values in eclipse.ini didn't work either.
Installing Java SDK 1.5 didn't work.
Does anyone have other possible solutions?
Update: I tried reinstalling Eclipse, but it didn't fix the problem. I did notice that it's a 32bit version, while I'm running a 64bit system. However, if this were to be the problem, I find it strange that it hasn't been an issue earlier.
Update 2 I've reinstalled both Eclipse and Java once more, and everything works again.
Remove the default value "256m/256M" from the eclipse configuration file (eclipse.ini).
You will find this line just below "--launcher.XXMaxPermSize".
Edit your Environment Variables >> System Variables >> Path to
C:\Program Files (x86)\Java\jdk1.6.0_24\bin;
(NOT C:\Program Files\Java\jdk1.7.0_01\bin;)
it should work
If you have got a problem like that, you should change the path of jre.
Firstly, computer> properties > advance system setting > Environment variables > find "path" under system variables then give the directory of your jre/bin. (for example C:\ Program Files\ java\ jre\ bin)
Perhaps you should reinstall Eclipse. Then you can add the JDK through Windows -> Preferences -> Java -> Installed JREs.
I had similar issue:
Eclipse IDE fail to launch with JVM Terminated. Exit code=-1
One thing that worked for me is to set -Xmx to 256m in eclipse.ini. If that is not good enough for you, you may also try using different JVM module than the one that eclipse uses by default.
If you look in the error dialog in your screen capture, you'll notice that the "-vm" option using "jvm.dll" as JVM. If you change it to use javaw.exe in your JAVA_HOME\bin folder, the problem should go away.
I'm still clueless as to what the difference is between using jvm.dll vs javaw.exe. Maybe jvm.dll is suppose to be used only for light-weight embedded java applet and it can't handle the load brought on by a full stand-alone Java UI software.
I just had the same problem on Windows 7, 64 bit. I reinstalled Java 32 and Java 64, and Eclipse, but it did not fix the problem. I found that in eclipse.ini the Dosgi.requiredJavaVersion was 1.5, so I changed it to Dosgi.requiredJavaVersion=1.6.0_25. In the Environmental variables I added to the PATH %JAVA_HOME%\bin;C:\Program Files (x86)\Java\jdk1.6.0_25\bin.
These changes fixed my Eclipse problem.
In my case the cause was a corrupted eclipse.ini file. I had been editing the file, and accidentally changed -Xmx512m to -Xmx512
First Approach:
I added below lines in eclipse.ini
-vm C:\Program Files(x86)\Java\jre\bin\java.exe
Modified below line in eclipse.ini (changed to 1.6.0_37 from 1.5),
-Dosgi.requiredJavaVersion=1.6.0_37
Deleted JAVA_HOME from environment variables which was pointing to c:\jdk1.6
Now Eclipse is working fine.
Second Approach:
Another way - don't add below line in Eclipse and only modify JAVA_HOME to point to C:\Program Files(x86)\Java\jre,
-vm C:\Program Files(x86)\Java\jre\bin\java.exe
Eclipse should work now.
I added the entry in the Path environment variable to the jdk bin folder and it started working
Path = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Application Virtualization Client;C:\Program Files\Java\jdk1.6.0_18\bin
There could be many possible causes for this error. It could be that compatible mode is not selected in windows 7 , path or eclipse.ini problem.
Please add "-vm" option to the eclipse.ini file available in the same folder as eclipse.exe.
The -vm option should point to the javaw.exe located in your machine, something like the below.
-vm C:\Program Files(x86)\Java\jre\bin\jawa.exe
After adding the above line to eclipse.ini save it. Now clicking eclipse.exe will automatically launch the IDE.
I had the same problem and it turned out to be a problem with 64-bit versions. My solution was removing all my Java programs and reinstalling the 64-bit JRE (I had downloaded the 64-bit Eclipse).
I tried all the solution still didnt find my luck.Lastly i got it resolved by pointing to client jvm.dll in eclipse.ini file
-vm
C:\jdk160_05\jre\bin\client\jvm.dll
I made a series of trials which you may find useful if you face the same and not getting resolved yet
exit-code-1
I resolved it by installing 32 bit JDK and editing eclipse.ini to point to 32 bit jdk . Added -vm C:\Program Files (x86)\Java\jdk1.7.0_71\bin at the end of eclipse.ini file.
Note: I have my JAVA_HOME pointint to 64 bit JDK
There is no need for reinstalling eclipse IDE or changing your environment variables. I had encountered this problem while working on my project I had this issue but I fixed it in no time and it works fine for me.
Before implementing any solution, Check first that you don't have multiple installations of JDK in your system. I have encountered many systems with JDK 1.7 and JDK 1.8. If it is so, simply change your -vm to the alternate jdk
C:\Program Files\Java\jdk1.7.0_60(jdk version you were not using)\jre\bin\client\jvm.dll
and start your eclipse IDE. IT will work but the workspace will not synchronized and the files will not be getting displayed. Just close your IDE and revert to your previous jdk link and Voila It works.
In case you have a single JDK installed in your system. I suggest clearing your CPU Physical memory. It so happens JVM has issues in execution if a lot of memory is utilised. Just go to the Task manager and close any redundant processes.
Hope this helps! Keep Coding :)
I added the new JRE to the eclipse.ini file and updated my PATH. Seemed to work for me.
I had encountered the same type of the popup message when i am opening IDT app in SAP. It has been resolved after reduced below value
Option Name: _JAVA_OPTIONS
value: -Xms512M -Xmx1024M ( Previously -Xmx2048)
If you encounter a problem like this you can get a little more information by using eclipsec.exe from a command-line instead of eclipse.exe. I got this additional info in the dos box:
C:\<...>\Eclipse>eclipsec
Error occurred during initialization of VM
Could not reserve enough space for object heap
So I lowered my -Xmx setting in eclipse.ini from 1024 to 768, which made it work again.
Why this was suddenly necessary I do not know atm, Eclipse has been running fine with 1024m some days ago.
I am able to solve same issue by specify the -vm
C:\Program Files\Java\jdk1.6.0_45\bin\javaw.exe in eclipse.ini.
I have the same error. It might be because your PC was forced to shut down at night.
My solution was go to the path C:\Users\<find your user profile>\AppData\Local\javasharedresources and delete the file inside this folder
You just click on startup on eclipse folder and open the eclipce or right click on startup and click open with last javaw, then you can find solution.
This problem occure in the case, when you are using 64 bit OS on 32 bit motherboard.
Now, it can be resolved easly,
First uninstall 64 bit java and install 32 bit java.
and set environment variable with jdk path.