Hi Friends,
In this video I represented, How to set JAVA_HOME path in mac OS x or later version.
From OS X 10.5, Apple introduced a command line tool (/usr/libexec/java_home) which dynamically finds the top Java version specified in Java Preferences for the current user.
To set JAVA_HOME path in Mac OSX or later, Please follow below stpes.
1. Open terminal window
2. Type command: $ vim ~/.bash_profile and Hit Enter
3. Type command: $ export JAVA_HOME=$(/usr/libexec/java_home) and press Escape key for Save changes.
4. Type command: :(colon)wq, It will Save and close .bash_profile file.
5. Type command: source ~/.bash_profile and hit Enter
6. Now we can check the value of the JAVA_HOME variable:
7. Type Command: echo $JAVA_HOME
The result should be the path to the JDK installation:
/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
Thanks for Watching this video Don't forget to Subscribe, Share, Like and comment.
---------------------------------------------------------------------------------------------------
Facebook: / techtalks23
YouTube: / @techies2.o
Twitter: / techtalks23
GooglePlus: https://plus.google.com/u/0/b/1029921...
TAGS:
---------------------------------------------------------------------------------------------------
set java_home mac sierra
set JAVA_HOME
JAVA_HOME
set JAVA_HOME on mac
set java_home mac
set java_home mac permanently
set java_home mac el capitan
add java_home to path mac
bin directory for $java_home is not set
add '$java_home/bin' to your path environment