I downloaded the latest Eclipse on Windows 7. When I click the eclipse icon it throws the following exception:
I have already installed JRE and JDK.
UPDATE: Eclipse.ini contents:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
-vm C:\Program Files (x86)\Java\jre7\bin
Add the -vm flag to fix the Eclipse JRE or JVM must be available error. And that's it. Make the change, save the file, and then re-run the Eclipse installer. The Eclipse “No Java virtual machine was found” error will go away, and the Eclipse IDE will be successfully installed on your desktop.
Eclipse is a Java-based application and, as such, requires a Java Runtime Environment or Java Development Kit (JRE or JDK) in order to run.
Developers can now use Eclipse JDT to develop Java applications that take advantage of the new Java 7 features. The new Eclipse JDT release will include the following for Java 7 support: Eclipse compiler implements all the new Java 7 language enhancements.
According to the Eclipse documentation, you may need to specify the VM before the VM args, and the path should not be on the same line as the -vm switch:
- 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 before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
Source: Eclipse Wiki
For example:
-vm
C:\Java\JDK\1.6\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m
You also might need to surround your path with some quotes, since it contains spaces. I always install things like Eclipse and Java in root directories with no spaces, not under Program Files
, to avoid this problem.
Reference the location of your JRE path in the eclipse configuration file, eclipse.ini
.
Note that you only need a JRE to launch Eclipse, but once Eclipse is launched, you should register a JDK for your projects. This is done via
Preferences-> Java -> Installed JREs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With