I have both the java 6 and java 7 sdk and jre on my machine, which is Windows 7 ultimate(64bit). I am trying to get to run a web project that was based on java 6. As I was about to set the environment variables, I noticed that there already is a 'PATH' variable whose value is C:\Program Files(x86)\Java\jre7\bin. I was about to change this to point to jre6, when I realised that java is actually installed in the 'Program Files' and not the 'Program Files(x86)'. Why then does the value point to Program Files(x86)folder? Hope someone can help explain. Thanks.
Answer: don't know. That PATH entry was most probably installed by the Operating System and you would do well not to change it.
Why are you using Java6 whose support was terminated some time ago? You can alter the PATH for the lifetime of a terminal window with
set PATH="C:\Program Files\Java\jdk1.6.0_55\bin";%PATH% (Windows®)
export PATH=/home/java/jdk1.6.0_55/bin:$PATH (Unix/Linux) That is probably the simplest way to change the version of Java®. But why do you need to change a version in the first place? A Java6 app will work happily on a Java8 runtime.