Setting up Eclipse with JRE Path

user2351151 picture user2351151 · May 6, 2013 · Viewed 220.9k times · Source

I have downloaded and extracted Eclipse. I have Eclipse in the following directory: C:\Applications\eclipse. When I try and run the executable , I get the following message :

NO JRE in System PATH

I currently have the following folder:

C:\Program Files (x86)\Java\jre7

Do I need to set up some environment variables for my Windows 7 OS to get Eclipse to run ? If so , may I please have some help to do this ? If not , can I please have some help to get Eclipse to run .

EDIT

I have changed the shortcut to include the path to the Virtual Machine , and am now getting this error :

http://www.canning.co.nz/Eclipse/Eclipse_Message2.png

Answer

Evgeniy Dorofeev picture Evgeniy Dorofeev · May 6, 2013

You can add this line to eclipse.ini :

-vm 
D:/work/Java/jdk1.6.0_13/bin/javaw.exe  <-- change to your JDK actual path
-vmargs <-- needs to be after -vm <path>

But it's worth setting JAVA_HOME and JRE_HOME anyway because it may not work as if the path environment points to a different java version.

Because the next one to complain will be Maven, etc.