Welcome to the Ranch!
Ofilia Astorga wrote:JAVA_HOME c:\Program Files\Java\jdk1.6.0_25
and
PATH %JAVA_HOME%\bin; \Java\jdk1.6.0_25\bin
What
exactly did you set the variables to, and how?
You don't really need to set JAVA_HOME. That environment variable is not used by Java itself. Some other programs need it to know where Java is installed, but not Java itself.
Make sure the
bin directory of the JDK is added to your PATH. If you installed the JDK in
C:\Program Files\Java\jdk1.6.0_25, then add
C:\Program Files\Java\jdk1.6.0_25\bin to the PATH (by adding a ; and then
C:\Program Files\Java\jdk1.6.0_25\bin to the existing PATH). Note: Do not put spaces before or after the ;.
As Stephan mentioned, you need to close and re-open the command prompt window after changing environment variables in Windows. The command prompt will not pick up changes in variables while it's open.
Ofilia Astorga wrote:When I check javac version it doesn't work.
What
exactly do you mean by that - did you get an error message, and if yes, then what was the error message? If the path is set up correctly,
you should be able to use the command:
javac -version
and it will tell you the version of the Java compiler. Note: It must be exactly
javac -version, not
javac version or anything else. Don't forget the
- before
version.
(It's important to be precise with the details, because computers only do exactly what you tell them to do - making even a small mistake will cause it to not do what you want it to do).