Add a function to change between Java versions.