“Как установить java_home в Mac” Ответ

Как установить java_home в Mac

Step-1: open terminal and type ls -al
if you did not find the .bash_profile proceed with Step-2 else continue with Step-3
Step-2: touch .bash_profile
Step-3: open -e .bash_profile
Step-4: export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home
Step-5: save it and close it
Step-6: source ~/.bash_profile
Step-7: echo $JAVA_HOME
Angry Anteater

Как добавить java_home в 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
Outstanding Osprey

Ответы похожие на “Как установить java_home в Mac”

Вопросы похожие на “Как установить java_home в Mac”

Больше похожих ответов на “Как установить java_home в Mac” по Java

Смотреть популярные ответы по языку

Смотреть другие языки программирования