How to Install Java JDK on Mac and set JAVA_HOME

preview_player
Показать описание
In this videos we'll see how to install Java JDK on Mac and set JAVA_HOME in the path using the ~/.zshrc file

Error:
The operation couldn’t be completed. Unable to locate a Java Runtime.

Command to install Java in Mac:

brew search java
brew info java
brew install java
ls /usr/local/Cellar/openjdk
ls /usr/local/opt/openjdk
java -version

Commands to install openjdk java version 8
brew search openjdk

Set the JAVA_HOME in ~/.zshrc file
vim ~/.zshrc
source ~/.zshrc
java -version

To see all versions of Java installed in the Machine:
ls -lsa /Library/Java/JavaVirtualMachines

#java #javajdk #jdk #installjava #javainstall #mac
Рекомендации по теме
Комментарии
Автор

Hey man, Thanks for sharing this! I did all steps but I still have the same issue on Pycharm terminal! I can see the Java version but the issue still exist </3 I'm using MacOS 13.2 (M1 chip). Any tips?

roxassoldat
visit shbcf.ru