Follow below link to uninstall Java 7 cleanly:
How do I uninstall Java on my Windows computer?
And then install Java 6 as usual.
UPDATE:
Setting the PATH
variable just provides you the access to javac
and the other programs and tools in the JDK bin
folder. The java.exe
in \windows\system32\
is provided so that not everyone needs to set a PATH
variable just to run a java program (from the command line) and selects a version (the last one installed it seems) of the installed java virtual machines (JVM) if there are more than one (publicly) installed.
Moreover, I tried to do keep install Java 7 on my machine and found out that installation of Java 7 silently deleted Java 6. On further digging into this aspect, I found on Oracle's website that:
The Java auto-update mechanism is designed to keep Java users
up-to-date with the latest security fixes. To achieve this goal
Windows users that rely on Java’s auto-update mechanism will have
their JRE 6 replaced with JRE 7.
Which clearly means that it will replace older java.exe
& javaw.exe
with newer one. By doing this system ensures that applets will run on the latest and most secure version of the JRE software. Hence, this move is justified in case of JREs which is an end user software, but removing JDK 1.6 would by contrast be poor behaviour, because the JDK is a developer tool, and developers should know what they are doing.
Quote from http://mindprod.com/jgloss/javaexe.html#MULTIPLES
To complicate things further the java.exe in system32 is just a dummy.
It looks in the registry and then decides which real java.exe to use.
The last JVM installed gets to be the one used, even if it is older.
To switch JVM s, you must normally reinstall the one you want.