That's because you are mixing the CLASSPATH and PATH variables.
You should change the PATH variable:
Don't forget that trailing :$PATH or your path will no longer have /bin, /usr/bin etc in it.
Note that you should put the new JDK path before $PATH because the shell will look from start to end in the path. If you put it at the end the old
java will be found.
Note 2: you can find out which java command is being executed by calling "which java".