Reputation: 1712
Previously in my machine, for
javac -version
I was getting
javac 1.6.0_65
I needed JDK 8 so I downloaded it from here and installed it. But still I am getting the same version. But when I am running
`/usr/libexec/java_home -v 1.8 --exec javac -version`
I am getting
`javac 1.8.0_11`.
What I am doing wrong?
Upvotes: 3
Views: 120
Reputation: 181270
When you install Java 8 your previous Java versions (Java 6, Java 7) don't get uninstalled.
You need to:
JAVA_HOME
location. If you are using linux you could try: /usr/sbin/alternatives --config java
(at least in RH based distributions).Upvotes: 1