Switching between different versions of Java
987842Jan 29 2013 — edited Jan 30 2013I have multiple versions of Java(Java 5, Java 6 and Java 7) on my machine. I want to run an older version of java(eg: Java 5). I have tried setting the JAVA_HOME = Java 5 and added the JAVA_HOME to Path. I have also brought up the Java Control Panel made sure that only the Java 5 is checked in the user tab, in the system tab nothing is checked cause only Java 7 is listed and the Add button is disabled. Still when I run java -version in the command prompt it shows the java version as Java 7. javac -version shows the expected Java 5.
I think uninstalling and re installing the different versions of Java my clear my issue but I don't want to keep doing this. Does anyone know where I could be going wrong.