add function to switch JVM version