I have both jdk and jre installed on my windows 7.
I have set the JAVA_HOME to
C:\\Program Files\\Java\\jdk1.6.0_23
I have add
make sure that your JRE/bin directory is not included in your path. the first instance of java.exe found while searching your path will be the one that is executed. if you've added your JDK to the path after the JRE then the JRE will always be picked.
you can also explicitly specify the full path to java.exe when invoking java. this will ensure that you always know what java jre/jdk you are invoking.