This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
opent the file /etc/bashrc with your favourite text editor and add the following lines to the top of the file
Ivan Jozsef Balazs
Joined: May 22, 2012
I make wrapping scripts for the different versions like javac15, java16, javap17, and put them on PATH and invoke from them the corresponding java executables with their full path name.
I found this to be a convenient way of peaceful coexistence of different Java versions.
That is an argument against a common global setting.