How do I install an earlier version of Java SDK on OSX -
i have java 1.8.0_45 sdk installed on osx yosemite (10.10.4), because of bug in release need go 1.8.0_25
i have downloaded , installed earlier version (1.8.0_25) after reboot java -version
still shows 1.8.0_45.
i don't understand java resides on osx, how can system uses 1.8.0_25
try , add ~/.bashrc
export java_home=/library/java/javavirtualmachines/jdk1.7.0_75.jdk/contents/home
you can have multiple jre/jdk's installed, changing path, can specify 1 use each time open new shell.
here use in .bashrc
java_version=7 java_7_home=/library/java/javavirtualmachines/jdk1.7.0_75.jdk/contents/home java_8_home=/library/java/javavirtualmachines/jdk1.8.0_40.jdk/contents/home tmp="java_${java_version}_home" export java_home=${!tmp} export path=${!j}/bin:$path
here, can change 7
8
.
this change java_home, , append bin directory path general use command line.
note may beed change java home's according specific release versions installed on machine.
Comments
Post a Comment