This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Java is not like Internet Explorer where there can be only one version for the entire OS. You can have multiple JDKs and/or JREs installed at once and pick which one to use on a per-application basis (although not a per-webapp basis, since web application servers are counted by the OS as a single Java app).
Therefore, assigning a JDE or JRE to the PATH depends on the shell instance.
I don't assign Java's PATH on a global basis, since apps such as Tomcat don't need Java in the path - the Tomcat control script simply uses the JAVA_HOME environment setting that was in effect when Tomcat was launched.
My development user account, however, does set (export) JAVA_HOME and adds $JAVA_HOME/bin to my PATH when I login or spawn a new shell process. I assign it in my .bashrc script, which isn't really the best place to put it out of the 8 or so possibilities, but it suffices for me.
An IDE is no substitute for an Intelligent Developer.