![]() ![]() So I removed the symbolic link CurrentJDK sudo rm CurrentJDKĪnd re-created the symbolic link pointing to JDK6, which is still on my Mac sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/ CurrentJDKĪnd that did the trick for me java -version Lrwxr-xr-x 1 root wheel 59 Nov 20 21:40 CurrentJDK -> /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/ Lrwxr-xr-x 1 root wheel 1 Oct 25 17:01 Current -> A Lrwxr-xr-x 1 root wheel 10 Oct 25 17:01 1.6 -> CurrentJDK ![]() Lrwxr-xr-x 1 root wheel 10 Oct 25 17:01 1.5 -> CurrentJDK ![]() I noticed that in my /System/Library/Frameworks/amework/Versions/, it showed the following: lrwxr-xr-x 1 root wheel 10 Oct 25 17:01 1.4 -> CurrentJDK I needed to revert back to JDK6, and I did it differently. After having installed JDK7, some of my applications no longer worked. Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode) Java(TM) SE Runtime Environment (build 1.7.0_09-b05) $ export JAVA_HOME=`/usr/libexec/java_home -v '1.7*'` Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) $ export JAVA_HOME=`/usr/libexec/java_home -v '1.6*'` ![]() bash_profile file in your home directory. You can use this value to set JAVA_HOME: export JAVA_HOME=`/usr/libexec/java_home -v '1.6*'`Įither as a one-off for a particular Terminal session, or permanently for all future terminal sessions by adding the above line to the. Will return a JAVA_HOME value for the best available 1.6 JDK on your system. This will be Java 7, but you can apply constraints using the -v flag, for example /usr/libexec/java_home -v '1.6*' Will print out the appropriate JAVA_HOME value for the most up to date JDK on your system. The tool /usr/libexec/java_home is your friend here. command line tools are sensitive to the value of the JAVA_HOME environment variable and will use 1.6 if this variable points to a 1.6 JDK. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |