how to know if JAVA JDK is installed mac
javac -version
which javac
how to know if JAVA JDK is installed mac
javac -version
which javac
how to check java path in mac
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us