To learn what Java versions I have installed on my Mac computer I will type the following in the terminal window: /usr/libexec/java_home -V If you have more than one Java version installed on your computer and you need to switch to using a different version, you can do so by adding the -v flag. This will print out the current Java version installed on your Mac computer. In the terminal window type java -verion.In the terminal window type source ~/.profile.Save the file by tapping on ESC button on the keyboard and then :wq. This will save the file and will quite.The /usr/libexec/java_home will return the current version of Java installed on the Mac computer. Add the following line export JAVA_HOME=$(/usr/libexec/java_home).Open the terminal windows and type: sudo vi ~/.profile.I will use the vi text editor on Mac but you can use the text editor of your choice. To set the JAVA_HOME environment variable for a current user you will need to update the ~/.profile file. Switch Between Java Versions Set JAVA_HOME Environment Variable.User Registration, Log in, Log out – Video Tutorials.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |