So, I reinstalled java in a directory that has no spaces, since I had problems with it before.
Java JDK is installed in:
E:\downloads\java\jdk
I created a user variable:
JAVA_HOME E:\downloads\java\jdk
And my Path looks like this:
%JAVA_HOME%\bin;%M2%;
Now open the NEW cmd prompt :
c:\java
'java' is not recognized...
but the echo works:
c:\echo %JAVA_HOME%
E:\downloads\java\jdk
so:
c:\%JAVA_HOME%\bin\java -version
java version "1.6.0_17"
I am trying to get this to work, so I can get maven to work, since maven has the same type of problems (I created M2_HOME and M2, and no one works).
What exactly am I doing wrong? I also have the same problem on my laptop, both work with Windows 7. I have to skip something!
Edit
According to your comments, M2 output:
M2
M2 = E:\\Java\-Maven-2,2,1-\-Maven-2.2.1\Bin
M2_HOME: e:\downloads\java\apache-maven-2.2.1-bin\apache-maven-2.2.1
PATH
alt text http://img130.imageshack.us/img130/6996/javasetpath.png