This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have changed Java environment variables good few times recently and I have never had problem like today. I have set up new Win 7 Proffesional 64-bit. I have installed JDK and I am stuck with variables.
Please have a look on pics. I also checked official oracle documentation for win7 and looks like I am doing everything OK.
1. Pic1 displays path on my hdd to my JDK
2. Pic2 displays what I am going to edit
3. As a result still getting the same answer that javac is not recognised as an internal or external command.
Any ideas what am I doing wrong ?
I also tried to change name path using " ~ "sign to avoid empty spaces like C:\progra~1\... but this is not working either.
I tried close terminal, restart win, after each step.
I tried to change path to c:\program files\java\jdk1.7.0_03\bin
Is there any way to set this up through command line ?
You circle "JAVA_HOME" but then indicated you set the path. "JAVA_HOME" is frequently used by scripts, but does not work for a command line window. You want to make sure you are setting the "PATH" (path) environment variable to include the java bin directory. Take care not to delete or modify any of the current entries in the path variable or you may break something.
As a side comment, you do want to re-open the command line window when changing the path but you should not need to perform a restart of the entire system.
JAVA_HOME should not include the bin folder. That should be part of the PATH, but not JAVA_HOME. My own PATH includes %JAVA_HOME%\bin so I only need to change JAVA_HOME and the PATH will be automatically updated as well.