Hi,
JAVA_HOME points to jdk installation directory.
JRE_HOME points to jre installation directory.
 
I too have both installed and variables set.

Try removing JRE_HOME for a change and see if this works.

Also do the following:
delete existing mvn folder.
unzip mvn2.1 snapshot zip available on dev.xwiki in c folder.
You can add the path to mvn bin in your system path.

Then try mvn -version

I have been building xwiki from source for quiet some time on windows and it works fine.

If this still does not work you can connect me on sachin_mittal on skype and I would try to help you with the same.

Thanks
Sachin

----------------------------------------------------------------------

Message: 1
Date: Tue, 4 Mar 2008 15:55:31 -0600
From: "Kamna Jain" <kammy.scorpi@gmail.com>
Subject: Re: [xwiki-devs] Building XWiki Core
To: devs@xwiki.org
Message-ID:
       <fb681d280803041355q1b3dd893uf1769a2ba41156c1@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Yes, I have both JDK and JRE installed in the same location. (is that a
problem?)
Sachin, I did add the bin dir. of mvn install to the Path variable but it
does not seem to help.
mvn --version also gives the same error as mvn install:

ERROR: JAVA_HOME not found in your environment.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation

This is the error I get.

Thanks