0

My eclipse has always worked for about a year, until recently i updated my Java, and when i tried using it this error popped: A java runtime Enviorment must be available in order to run eclipse.

Also i use intellij and that works perfectly fine.

I am using windows 7 64bit java version 7 and latest eclipse.

Stratmoss
  • 19
  • 6
  • 1
    A lot of information is needed what java version, eclipse version and bit for both. Even the error why eclipse won't open. – StackFlowed Sep 04 '14 at 13:31
  • http://stackoverflow.com/questions/2030434/eclipse-no-java-jre-jdk-no-virtual-machine – BatScream Sep 04 '14 at 13:33
  • Have you change JDK and JRE HOME and respective PATH in environment variable to one which you recently installed? – Mind Peace Sep 04 '14 at 13:48
  • I confirm with Aeshang. Please check the version of your eclipse. Maybe it is a 32bit version, then you also need a 32bit java version instead of 64bit. Or update your eclipse to a 64bit version. – Hardie82 Sep 04 '14 at 13:50

3 Answers3

0

Check the contents of the file eclipse.ini. If probably contains a line -vm. Make sure the next line (which must contain the absolute path to the Java version to use) is correct.

If there isn't a -vm line, then add one:

-vm
C:\Program Files\Java\...\java.exe

Rules: Spaces are okay, quotes aren't. The -vm must be on one line and the absolute path to java.exe in the next.

Note: There is also -vmargs which does something different.

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • I only have this: -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326 -product org.eclipse.epp.package.standard.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms40m -Xmx512m Thats all it dislpay, on one line. – Stratmoss Sep 04 '14 at 13:39
  • @Stratmoss: See my edits how to configure Eclipse to use a specific Java VM. – Aaron Digulla Sep 04 '14 at 13:42
  • I dont have -vm though? – Stratmoss Sep 04 '14 at 13:47
  • @Stratmoss: "If there isn't a -vm line, then add one"? – Aaron Digulla Sep 04 '14 at 13:51
-1

Goto to eclipse folder and check in eclipse.ini which version is set over there. If it does not match with your JRE version change it by using this one

-vmargs
-Dosgi.requiredJavaVersion=1.6
Qadir Hussain
  • 1,263
  • 1
  • 10
  • 26
  • I only have this: -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326 -product org.eclipse.epp.package.standard.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms40m -Xmx512m Thats all it dislpay, on one line. – – Stratmoss Sep 04 '14 at 13:41
-2

Go to Eclipse>Preferrence>Java>Installed JREs. Check which JRE it is pointing to.

JavaLearner
  • 389
  • 1
  • 3
  • 8