The environment variable JAVA_HOME has no special meaning to Java. Some Java applications such as Tomcat use it but Java in general does not. If your JAVA_HOME points to a non-existent directory then it can probably be safely removed.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Sorry I have few experience in setting Java @ Unix server. Might not be true but it seems like whereis also prints the soft links pointing to real installation of java. Usually the /usr/bin/java where the one we used in the past to compile.
On Unix-like operating systems, you can have symbolic links. For example, /usr/bin/java might be a link to a file in a completely different directory (maybe somewhere in the directory /usr/lib/jvm/java-1.6.0-sun.x86.64). You can't see that just by looking at the name /usr/bin/java alone.