-1

I have a rather trivial issue for which I cannot find a solution. I have two versions of Java installed on my local machine namely jdk1.5.0_16 and jdk1.7.0_80, both residing under Program Files. I want to use jdk1.5.0_16 in my Path. But even after I change my path to include jdk1.5.0_16, running "java -version" in command prompt returns jdk 1.7.

Can anyone suggest what I am doing wrong here or how can I change it to point to jdk1.5.0_16?

Andrey Tyukin
  • 43,673
  • 4
  • 57
  • 93
Anirban
  • 925
  • 4
  • 24
  • 54

1 Answers1

0

Open cmd and type set p it will print all variables starting with p. You can do the same with set java.

Betlista
  • 10,327
  • 13
  • 69
  • 110
  • I am building my project using Ant which takes the JAVA_HOME from environment variables. So need to change it in path – Anirban Feb 01 '18 at 14:42
  • Maybe you want to check - https://stackoverflow.com/questions/573235/how-do-i-change-the-java-home-for-ant – Betlista Feb 01 '18 at 14:47