0

I want ot change my jdk versiob from 1.8 to 1.6 but how do have to do this? I read this post How to set or change the default Java (JDK) version on OS X? which is what I think the solution, but when I am goign to 'C:\Program Files\Java' there are only two folder, one jdk1.8.0_65 and jdk1.8.0_73 there is no jdk1.6 so how and where can I get this there?

Community
  • 1
  • 1
Number_987
  • 123
  • 1
  • 9

1 Answers1

0

Install the Java version you want to use.

You can use jenv, it is like a Java environment manager. It is super easy to use and clean

For Mac, follow the steps:

brew install jenv

git clone https://github.com/gcuisinier/jenv.git ~/.jenv

Installation: If you are using bash follow these steps:

$ echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile

echo 'eval "$(jenv init -)"' >> ~/.bash_profile

$ exec $SHELL -l

Add desired versions of JVM to jenv:

jenv add /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

jenv add /System/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home

Check the installed versions:

jenv versions

Set the Java version you want to use by:

jenv global oracle64-1.6.0
slal
  • 2,657
  • 18
  • 29