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!!!
Recently I was facing problem in attending webex meeting with Firefox browser, so I visited Java documentation for updating Java plugin for Firefox at http://www.java.com/en/download/help/firefox_java.xml.
I did what was explained in there I got it working.
But after a couple of days when I tried starting my Eclipse, it didn't start. I got a small window like this --
I tried searching about it & understood, its related to $PATH but I don't know how to fix it as I don't have access to the GUI of Eclipse, so can't change the path. There must be some other way to do it.. I don't have expertise with IDE, so I need help on this..
Edited:
I visited the linked question & found I can solve it by editing eclipse.ini file. I did open it for edit and added the path, now it looks like --
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
/usr/lib/jvm/java-7-openjdk-amd64/java
-vmargs
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
You can see my added two lines just after 'openfile', which is --
-vm
/usr/lib/jvm/java-7-openjdk-amd64/java
I restarted the system & tried opening the eclipse, but same window comes.
I updated the Android Software to the latest and greatest, and it told me I need to update Eclipse to Helios or newer. So, I upgraded to Indigo, and now I'm getting the following message on startup of eclipse and can't move ahead with upgrading and getting back to work...
(source: pelepublications.com)
I'm concerned about moving the eclipse to a different folder b/c I don't know much about eclipse prefs and if it'll cause me problems (a need to update prefs that assume the default location) and if it needs to be in the Java/IDE folder. (I also suspect that shouldn't be the problem.)
I tried creating a batch file with the following content to pass in the argument they recommend, and it doesn't change the error.
"C:\Program Files\Java\IDE\eclipse\eclipse.exe" -vmargs -Dosgi.locking=none
I also tried to change the eclipse.ini folder which now has the following contents - note the last line (this didn't help either)
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx384m
-Dosgi.locking=none
Does anyone know what I'm doing wrong / how I can fix this problem? I need to get back to work...
I'm running eclipse on Windows 7
Thanks in advance!
I think Windows 7 does not allow applications to write to the Program Files folder unless you run as administrator; I believe that's why you're seeing this message - Eclipse can't create a lock file where you have it installed.
Eclipse doesn't care where it is "installed" (really it's just unzipped); it does not put things in your windows registry or anything like that, so you can move it around at will. Your workspace(s) and projects are where the important stuff is stored.
i'm using RHEL linux to run Helios Eclipse 3.6, and just recently, whenever i try to right click on a project and mouse over to "Run As", eclipse freezes itself and the whole OS. Mousing over to anywhere else is fine, like 'close project' or 'build configurations'... Basically, eclipse works fine for everything except running a project. If i do CTRL+F11, it also freezes because it's trying to open the "Run As" screen.
here's what i have in my eclipse.ini file:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dorg.eclipse.swt.browser.XULRunnerPath=''
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=1024m
-Xms128m
-Xmx512m
The only things that i recall having changed recently was setting the stack size to be higher, -Xss500m or something... but i remember taking out that line before i consistently see these eclipse freeze. (not sure if this is relevant, but one time, also recently, i set asize something ridiculous like 9 terabytes of data in a thread that i ran off of an android project on eclipse. later i get the eclipse freeze and i had to do a manual force shutdown).
Try a new Eclipse workspace (File / Switch Workspace). If that works, there is maybe a very large cache or something stored within the old workspace metadata. How large is your .metadata directory? If more than 1 GB, for example, look for any excessively large directories, and any cache files that can at least be temporarily moved elsewhere to see if that improves things.
I'd also try the usual of upgrading to the latest version of Eclipse, as well as the JDK you're using to run it with.
I'm having some weird problems with Eclipse lately. I haven't installed any new plugins that I think could have caused them (xcarecrows and m2eclipse, both already removed).
The problem is that Eclipse sometimes hangs on random things. Sometimes simply by opening it, sometimes clicking anywhere on the GUI while it's loading something, sometimes while pasting code (Java). But the biggest problem is that it doesn't unfrezze.
AFAIK the problem started when I experimented with settings in eclipse.ini, but I can't be sure because it was some time ago and it hasn't happened all that often.
I don't know how to find out what could be causing this so I'm asking here, maybe someone can suggest some diagnostics.
Also, here's my eclipse.ini, maybe there's something wrong in it:
-showlocation
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vm
C:/Program Files/Java/jdk1.6.0_22/jre/bin/server/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms128m
-Xmx384m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+CMSIncrementalPacing
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
The canonical reference for this kind of issues is How to report a deadlock in Eclipse.
You will need to aquire the thread dumps of all threads. Perhaps it will give you insight of a bad plugin, or perhaps Eclipse itself.
If you suspect this is memory-related, you should read Getting a heap dump and analyse the resulting file in the Eclipse Memory Analyzer