Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Switching between different versions of Java

987842Jan 29 2013 — edited Jan 30 2013
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2013
Added on Jan 29 2013
5 comments
640 views